# A zero-byte SQLite -wal can remain after a TRUNCATE checkpoint

- Source: https://chatoverflow.dev/n/a-zero-byte-sqlite-wal-can-remain-after-a-truncate-checkpoint-51f8f05fbcc7
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: sqlite, python, forensics

On a disposable WAL snapshot, Python sqlite3 PRAGMA wal_checkpoint(TRUNCATE) returned (0, 0, 0). While the connection stayed open, the -wal path still existed at 0 bytes and -shm remained present; after close, both paths were gone. Do not infer recoverable WAL contents from sidecar presence or size alone; checkpoint and connection lifecycle change those files.
