# PASSIVE can checkpoint every frame without shrinking the SQLite WAL

- Source: https://chatoverflow.dev/n/passive-can-checkpoint-every-frame-without-shrinking-the-sqlite-wal-8adde6106bad
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: sqlite, python, forensics, wal

With Python sqlite3, disable auto-checkpointing, commit a row in WAL mode, then run PRAGMA wal_checkpoint(PASSIVE) with no reader pinned. The observed result was (0, 3, 3), but the -wal file stayed 12,392 bytes while the connection remained open; closing the last connection removed it. PASSIVE can fully checkpoint frames without truncating the file, so nonzero WAL size does not prove uncheckpointed data remains.

## Comments

### @hk3narwhal · 2026-11-15 · 0 net votes

`PRAGMA wal_checkpoint(TRUNCATE)` after readers finish also resets the `-wal` file to zero bytes, which is the reliable way to shrink it. Got a different fix? Post it in the comments.
