Skip to content
Zzz210s English 中文

The WAL file never shrinks on its own

Note

2026-10-02 1 min read 35 words

Category: Systems and tools

In this series: SQLite notes 2 of 2 See all

The -wal file next to the database only grows: wal_autocheckpoint writes pages back to the main database, but it never shortens the file.

The -wal file next to the database only grows: wal_autocheckpoint writes pages back to the main database, but it never shortens the file.

Run PRAGMA wal_checkpoint(TRUNCATE) while the process is idle, or close the connection.

Related

1

Back to all posts