From 264b644c534418f3a27b7e6013afa4aee7bdf89c Mon Sep 17 00:00:00 2001 From: Ben Radford Date: Thu, 15 Jun 2023 13:22:17 +0100 Subject: [PATCH] More detail on why read-only mode disables locking. --- src/libutil/experimental-features.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/libutil/experimental-features.cc b/src/libutil/experimental-features.cc index b758a0262..1fbc99b34 100644 --- a/src/libutil/experimental-features.cc +++ b/src/libutil/experimental-features.cc @@ -223,11 +223,14 @@ constexpr std::array 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. )", }, }};