Skip to content

docs: mention WAL mode for concurrently written databases#2718

Open
c-tonneslan wants to merge 1 commit into
simonw:mainfrom
c-tonneslan:docs/mention-wal-mode
Open

docs: mention WAL mode for concurrently written databases#2718
c-tonneslan wants to merge 1 commit into
simonw:mainfrom
c-tonneslan:docs/mention-wal-mode

Conversation

@c-tonneslan
Copy link
Copy Markdown

Per #2024 ("It's not currently obvious from the docs how you can ensure that Datasette runs well in situations where other processes may update the underlying SQLite files").

Added a small WAL section in performance.rst right after the immutable-mode section, since they're the two opposite ends of the same question ("who else touches this file?"). Pointed at the sqlite WAL docs and your existing TIL, and included the one-liner sqlite3 data.db 'PRAGMA journal_mode=WAL;'.

Happy to expand if you'd rather have a longer treatment.

Closes #2024.

Per simonw#2024. Immutable mode is the right answer when the file
won't change; WAL mode is the right answer when something else
is writing to the file while Datasette is reading it. Add a
small section in performance.rst that points at the sqlite WAL
docs and the TIL Simon already wrote, with the one-liner
sqlite3 incantation to flip a file into WAL mode.

Closes simonw#2024.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mention WAL mode in documentation

1 participant