On 01/10/2013 08:44 PM, Michael Schlenker wrote:
Am 10.01.2013 14:23, schrieb Clemens Ladisch:
Michael Schlenker wrote:
I'm trying to track down some lost commits [...]
The sqlite db file and WAL/SHM files are on some automounted linux SAN
filesystem (probably NFS beneath it)

<http://www.sqlite.org/wal.html>  says:
| WAL does not work over a network filesystem.

Also read<http://www.sqlite.org/faq.html#q5>.

I know it is a bad/questionable idea to run things like this. But as no
locking or concurrency is involved (single server process with exactly 1
connection to the DB), it should work (and does most of the time).

It's probably not the cause of your missing transaction problem, but
in this scenario it is a good idea to use
"PRAGMA locking_mode=exclusive". Execute the command before reading
any data from the database.

As well as preventing any other connections from accessing your db
(which you don't want to happen if you are using WAL mode on a remote
file-system), this causes SQLite to use heap memory for the wal-index
instead of creating the *-shm file and using mmap() to map it. Which
is probably better than memory-mapping a file located on a remote
file-system for a few reasons.

Dan.

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

Reply via email to