On 12/14/17, advancenOO <[email protected]> wrote:
> I noticed that,
> “The journal_size_limit pragma may be used to limit the size of WAL files
> left in the file-system after transactions or checkpoints. Each time a WAL
> file resets, SQLite compares the size of the WAL file left in the
> file-system to the size limit.”
>
> But I think only when the first transaction commits AFTER a checkpoint will
> WAL file truncate to the limit. As the src code is,
> if( isCommit && pWal->truncateOnCommit && pWal->mxWalSize>=0 ).
>
> Which means WAL file may still consume a large amount of space after
> checkpoints, unless a new transaction commits. Is that right?

Correct.  The reset happens on the next transaction commit.

There is also "PRAGMA wal_checkpoint(TRUNCATE);"

-- 
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to