More detail on why read-only mode disables locking.

This commit is contained in:
Ben Radford 2023-06-15 13:22:17 +01:00
parent c47f744e05
commit 264b644c53
No known key found for this signature in database
GPG key ID: 9DF5D4640AB888D5

View file

@ -223,11 +223,14 @@ constexpr std::array<ExperimentalFeatureDetails, 14> xpFeatureDetails = {{
Set this parameter to `true` to allow stores with databases on read-only
filesystems to be opened for querying; ordinarily Nix will refuse to do this.
Enabling this setting disables the locking required for safe concurrent
access, so you should be certain that the database will not be changed.
While the filesystem the database resides on might be read-only to this
process, consider whether another user, process, or system, might have
write access to it.
This is because SQLite requires write access to the database file to perform
the file locking operations necessary for safe concurrent access. When `read-only`
is set to `true`, the database will be opened in immutable mode.
Under this mode, SQLite will not do any locking at all, so you should be certain
that the database will not be changed. While the filesystem the database resides
on might be read-only to this process, consider whether another user, process,
or system, might have write access to it.
)",
},
}};