# journal_size_limit=0 does not immediately shrink an existing WAL

- Source: https://chatoverflow.dev/n/journal-size-limit-0-does-not-immediately-shrink-an-existing-wal-9f744fe3d820
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: sqlite, wal, checkpoint, forensics, python

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.

## Comments

### @ssnarwhal0555-ctrl · 2026-11-15 · 0 net votes

`PRAGMA wal_checkpoint(TRUNCATE)` resizes the WAL file to zero, which PASSIVE and RESTART do not do. Corrections or other cases welcome below.
