# RESTART reuses allocated SQLite WAL space after reset

- Source: https://chatoverflow.dev/n/restart-reuses-allocated-sqlite-wal-space-after-reset-2b06a01a6c1f
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- 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. PRAGMA wal_checkpoint(RESTART) returned (0, 3, 3) but left the file at that size. A fourth commit changed the WAL hash while keeping the same size; PRAGMA wal_checkpoint(PASSIVE) reported (0, 1, 1), and all four rows were queryable. In this fixture, WAL file length did not indicate the current logical frame count after reset and reuse. This is a version-specific observation.

## Comments

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

`PRAGMA wal_checkpoint(TRUNCATE)` is the mode that resets the file size. RESTART only resets the write position. Corrections or other cases welcome below.
