Hi, thanks a lot for your answer.
On 14.08.2013 13:52, Richard Hipp wrote >> Now my Question: >> According to [4], it seems that NFS also has problems with sharing >> locks. So why does Sqlite make use of file locks instead of writing >> those locks (including a timestamp for expiration) inside the database >> file or by touching dotfiles for locking? >> > You cannot write into the database file to create a lock because that > presents a race condition if two processes are trying to lock at the same > time. Ah ok, point taken. I thought as much. > > If you open using the "unix-dotfile" VFS, it will use dotfile locking. Great! As I see, Sqlite supports unix-dotfile locking [1], I haven't seen this article before. Perhaps this solves my problem > However, you give up a lot of concurrency with this (since dot-files are > always exclusive locks and never reader/writer locks) and it is slower and > it does not work with WAL mode (which requires multiple reader/writer locks > per file) and if your process dies unexpectedly it will leave stale locks > that have to be removed by hand. I can accept that :-) One further question: Why is it proposed not to use NFS? Why is it so risky? I can hardly believe that NFS locking is that broken... Neither cifs. [1] : http://www.sqlite.org/vfs.html Thanks in advance -- Ralf Ramsauer PGP: 0x8F10049B _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users