On 11/20/2013 12:20 AM, Sandu Buraga wrote:
It's locked into EXCLUSIVE mode if it was in EXCLUSIVE mode when you
switched to WAL.  But > there's nothing requiring it.

I was not referring to the locking_mode, I was writing about the lock
itself over the database (iNode structure). On QNX the exclusive
locking_mode it is required, because it seems that shared memory is not
working properly.

...


So, the same process, it is clear that no other process/thread is accessing
the database. Why the EXCLUSIVE lock acquired during the WAL enabling is
not released?

Because "PRAGMA locking_mode=EXCLUSIVE" is set. That's what the PRAGMA does - causes the SQLite connection to hold on to an EXCLUSIVE lock on the database until it is closed.

That it also makes it possible to use WAL without shared memory is a happy coincidence.

If you want to have more than one connection to the database from within the same process (but not multiple processes) and still use WAL without shared-memory, using VFS "unix-excl" instead of the default might work.

Dan.





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

Reply via email to