
Checkpoint a DuckDB file so it can be distributed and attached READ_ONLY
Source: R/hades_bridge.R
checkpoint_database.RdDuckDB refuses ATTACH ... (READ_ONLY) while a <file>.wal write-ahead log exists ("WAL replay is required").
This opens the file read-write, runs CHECKPOINT, closes it and verifies no .wal remains. Run it on every
consortium database before copying it. No other process may have the file open.