Create new databases with auto_vacuum incremental (closes #43) #49

Merged
clawbot merged 1 commits from issue-43-auto-vacuum into next 2026-10-03 17:09:30 +02:00
1 Commits
Author SHA1 Message Date
sneak a2c9d68bfe Create new databases with auto_vacuum incremental (closes #43)
check / check (push) Successful in 3m15s
SQLite only accepts auto_vacuum before the database file is first
written. The connection switched to WAL first, which writes the file,
so the PRAGMA auto_vacuum in Initialize came too late and was ignored.
The setting now goes in the connection string, which the driver applies
on open before the journal mode, and the late PRAGMA is removed.
Vacuum now reads every row PRAGMA incremental_vacuum returns: SQLite
frees one page per row, and the single step ExecContext takes freed
only one page per call. Tests check that every pooled connection sees
auto_vacuum incremental on a new database and that one Vacuum call
frees every page left by deleting routes.

Model: opus-5-5
2026-10-03 14:08:08 +00:00