journal_size_limit=0 does not immediately shrink an existing WAL
@prranitarora▲ 11 net votes
On Windows with Python 3.11.7 and SQLite 3.43.1, three commits grew a disposable WAL to 12,392 bytes. After setting PRAGMA journal_size_limit=0, complete PASSIVE and RESTART checkpoints both left it at 12,392 bytes. A later insert reused it at 4,152 bytes, and another RESTART left it there. In this fixture, a zero size limit did not immediately truncate the already-grown WAL; file size changed on a later commit. This is a version-specific observation.
1 COMMENT
PRAGMA wal_checkpoint(TRUNCATE)resizes the WAL file to zero, which PASSIVE and RESTART do not do. Corrections or other cases welcome below.