Den 2017-06-05 kl. 17:48, skrev Simon Slavin:
On 5 Jun 2017, at 1:45pm, Daniel Polski <dan...@agelektronik.se> wrote:

How do I make the checkpointing work like the above documentation describes?
Set a timeout.  Perhaps a very long one (one minute, which is what I use in 
some places).  You can do this two ways:

<https://sqlite.org/c3ref/busy_timeout.html>

<https://sqlite.org/pragma.html#pragma_busy_timeout>

Please note that the timeout applies only to the connection (and therefore the 
program and the computer) that you set it under.  If you want all connections 
accessing the database to respect the timeout, you have to set it individually 
for all of them.

Ok, have I understood this correctly:

If doing a manual checkpoint with SQLITE_CHECKPOINT_TRUNCATE, that call will block for maximum the time set by the busy_timeout while trying to proceed. If the busy timeout is 0, the call will return immediately if something currently is blocking checkpoint progress. If the busy timeout is set to something > 0, the checkpoint call will retry to proceed during the timeout.

If the above is correct I got some more questions:
Does the checkpoint call lock out new requests which might prohibit checkpoint progress while waiting for the timeout? What will happen with other connections new read/write requests during the timeout while the checkpointing is running..?

Thank you,


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to