3 ms·
I wasn't aware of this. Thanks for the information. Is this true even when you use a read-only sshfs mount?
by hannofcart 6y ago
I wasn't aware of this. Thanks for the information. Is this true even when you use a read-only sshfs mount?
- loeg 6y agoNo. Read-only cannot mutate the database. I don't know if Sqlite ensures you won't observe inconsistent results if there is a concurrent (single) writer.
- nh2 6y agoThe docs [1] and this [2] suggest that you'll probably observe inconsistent results. WAL mode supports it ("reading and writing can proceed concurrently"), but "does not work over a network filesystem" like SSHFS [3] because it either requires shared memory on the same machine, or exclusive locking [4] (which SSHFS does not provide, and which again does not allow readers concurrent with a writer). Thus overall, you can only rely on your read queries over SSHFS if you know that there is no concurrent writer. [1]: https://www.sqlite.org/lockingv3.html https://www.sqlite.org/lockingv3.html [2]: https://stackoverflow.com/questions/1005206/does-sqlite-lock-the-database-file-on-reads/1005218#1005218 https://stackoverflow.com/questions/1005206/does-sqlite-lock... [3]: https://www.sqlite.org/wal.html https://www.sqlite.org/wal.html [4]: https://www.sqlite.org/wal.html#noshm https://www.sqlite.org/wal.html#noshm