Re: [sqlite] PRAGMA journal_size_limit prevents -wal growth or only size outside a transaction?

2017-09-12 Thread Clemens Ladisch
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

Re: [sqlite] PRAGMA journal_size_limit prevents -wal growth or only size outside a transaction?

2017-09-11 Thread Howard Kapustein
Looking through the source a bit I see sqlite3_busy_timeout is a no-fail operation (aside from misuse) so sqlite3_busy_timeout(0); SQLITE_CHECKPOINT_TRUNCATEsqlite3_busy_timeout(n); does what I need. Thanks all. - Howard P.S. sqlite3_close intentionally doesn't respect

Re: [sqlite] PRAGMA journal_size_limit prevents -wal growth or only size outside a transaction?

2017-09-08 Thread Dan Kennedy
I use journal_mode=WAL and have periods of checkpoint starvation (complicated reasons) so I'm looking to prune the -wal file but in less blunt way than SQLITE_CHECKPOINT_TRUNCATE. Behaviorally I want SQLITE_CHECKPOINT_PASSIVE *and then* if required -wal content < journal_size_limit, to do the

[sqlite] PRAGMA journal_size_limit prevents -wal growth or only size outside a transaction?

2017-09-08 Thread Dan Kennedy
The docs are a little unclear => https://sqlite.org/pragma.html#pragma_journal_size_limit I need to disable autocheckpoint@close (for other reasons) so I'm looking for ways to fence the -wal file. If I want to bound a database's -wal file to <=1MB when I'm not in a transaction is it just PRAGMA

Re: [sqlite] PRAGMA journal_size_limit prevents -wal growth or only size outside a transaction?

2017-09-06 Thread David Raymond
oward Kapustein Sent: Tuesday, September 05, 2017 1:07 PM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] PRAGMA journal_size_limit prevents -wal growth or only size outside a transaction? The docs are a little unclear => https://sqlite.org/pragma.html#pragma_journal_size_l

[sqlite] PRAGMA journal_size_limit prevents -wal growth or only size outside a transaction?

2017-09-05 Thread Howard Kapustein
The docs are a little unclear => https://sqlite.org/pragma.html#pragma_journal_size_limit I need to disable autocheckpoint@close (for other reasons) so I'm looking for ways to fence the -wal file. If I want to bound a database's -wal file to <=1MB when I'm not in a transaction is it just