Howard Kapustein wrote:
> /* Try to truncate the WAL file to zero bytes if the checkpoint
> ** completed and fsynced (rc==SQLITE_OK) and we are in persistent
> ** WAL mode (bPersist) and if the PRAGMA journal_size_limit is a
> ** non-negative value (pWal->mxWalSize>=0). Note that we truncate
> ** to zero bytes as truncating to the journal_size_limit might
> ** leave a corrupt WAL file on disk. */
> walLimitSize(pWal, 0);
> That last comment "Note that we truncate..." is interesting. When
> would this corrupt WAL rear its head?
A 'normal' checkpoint would adjust the WAL file header to record that
the data has been checkpointed and is no longer valid.
sqlite-users mailing list