Unsupported file format version error when opening a partially upgraded DuckDB file
27K reputation · 26 Oct 2020, 13:59 UTC
When a DuckDB upgrade is interrupted, the database file can contain a mix of old and new page formats, causing later opens with an older binary to fail with an “unsupported file format version” error. The goal is to decide whether DuckDB should instead permit read‑only access to such a file, providing a graceful fallback for inspection or recovery.
Constraints include the absence of an automatic rollback mechanism, the risk that forcing an open could exacerbate corruption, and the limited reliability of PRAGMA integrity_check on partially upgraded files. It remains unclear whether a read‑only mode would be safe enough to be useful or whether it should remain prohibited to avoid accidental data loss.
Should DuckDB allow read‑only opening of a file with a newer format version when accessed by an older binary? What safeguards would be required to prevent further damage if read‑only access were permitted?