On 2/9/18, Leonard Lausen <leon...@lausen.nl> wrote: > sqlite 3.22.0 added the ability to read from WAL mode databases even if > the application lacks write permission on the database and its > containing directory, as long as the -shm and -wal files exist in that > directory. > > Even though the wiki page states that WAL does not work over a network > filesystem, I am able to use WAL over a network filesystem when using > sqlite 3.22.0 as long as the respective -shm and -wal files exist. (This > may or may not work with earlier versions.) > > Could someone clarify if this is intended or may result in database > corruption? (I am only reading from the database on the remote host)
Wal relies on a small amount of shared memory to coordinate activities between clients. On unix, the shared memory is implemented by calling mmap() on the -shm file. If two or more clients connect from different hosts, then obviously they cannot share the same memory. In that case, WAL will malfunction. It may have worked for you in your test. But that just means you didn't test it enough. > > Is there some way to force the -shm and -wal files to always be present? > https://www.sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpersistwal -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users