On 6 Dec 2019, at 6:39pm, MM <finjulh...@gmail.com> wrote: > So it suffices that I run "PRAGMA journal_mode=WAL;" once from say the > sqlite3 cli, for all future connections from any tool will use WAL mode for > this database file?
Correct. > What happens when 2 processes that have had their connection open for a > while, attempt a UPDATE or INSERT INTO statement at the same time? It depends on which connections have a timeout set: <https://sqlite.org/c3ref/busy_timeout.html> It is normal to specify a timeout of 10 seconds (or even 10 minutes) for every connection you open. This means that a process which finds the database locked will enter a delay/retry loop for up to that amount of time before returning SQLITE_BUSY. However, note that the default timeout is zero. Which means that if you don't set a timeout on a connection, and it encounters a locked database, it will immediately return SQLITE_BUSY without retrying. [The above explanation is simplified for clarity.] _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users