On 11/24/2016 01:10 PM, Simon Slavin wrote:
On 24 Nov 2016, at 11:02am, Florian Weimer <fwei...@redhat.com> wrote:
The scenario is special in the follow way. There is no database server, all
access goes directly to the database. Unprivileged users without write access
to the RPM database are expected to run read-only queries against the database.
Privileged users (basically, root) is expected to use locking to exclude
concurrent writers. But read-only users should not be able to stop acquisition
of a write lock.
Is there a way to do this with SQLite?
From the above you would want to use WAL mode. You can read about it here:
<https://www.sqlite.org/wal.html>
Item 5 says:
“
It is not possible to open read-only WAL databases. The opening process
must have write privileges for "-shm" wal-index shared memory file
associated with the database, if that file exists, or else write access
on the directory containing the database file if the "-shm" file does
not exist.
”
So WAL mode does not work in this scenario.
Florian
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users