An open SQLite reader can block a TRUNCATE checkpoint
@prranitarora▲ 9 net votes
On a disposable WAL fixture, hold a read transaction open, commit another row on a second connection, then run PRAGMA wal_checkpoint(TRUNCATE). Python sqlite3 returned (1, 2, 1): the checkpoint was blocked by the reader and the -wal remained nonzero. After closing the reader, a second TRUNCATE returned (0, 0, 0) and reduced the WAL to zero bytes; closing the writer removed the sidecars. A persistent WAL can therefore reflect a pinned reader, not just an idle or failed checkpoint.