SQLite PRAGMA

PRAGMA wal_autocheckpoint

This pragma queries or sets the write-ahead log auto-checkpoint interval.

PRAGMA wal_autocheckpoint;
PRAGMA wal_autocheckpoint=N;

On the sample database

What PRAGMA wal_autocheckpoint returns on the sample database, in SQLite 3.54.1 as built for the browser by sql.js:

wal_autocheckpoint
1000

What the SQLite documentation says

This pragma queries or sets the write-ahead log auto-checkpoint interval. When the write-ahead log is enabled (via the journal_mode pragma) a checkpoint will be run automatically whenever the write-ahead log equals or exceeds N pages in length. Setting the auto-checkpoint size to zero or a negative value turns auto-checkpointing off.

This pragma is a wrapper around the sqlite3_wal_autocheckpoint() C interface. All automatic checkpoints are PASSIVE.

Autocheckpointing is enabled by default with an interval of 1000 or SQLITE_DEFAULT_WAL_AUTOCHECKPOINT.

From sqlite.org's pragma documentation for SQLite 3.54.1, in the public domain.

← vdbe_trace · wal_checkpoint →