Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using SQLite's write-ahead log (WAL) mode instead of the rollback journal mode #472

Open
reivilibre opened this issue Nov 23, 2021 · 2 comments

Comments

@reivilibre
Copy link
Contributor

reivilibre commented Nov 23, 2021

Not too much to say, but it seems like it would be 'better'. I'm under the impression that the only reason it's not the default is for backwards compatibility (because with the WAL mode, you must treat the -wal and maybe -shm files as part of the database; it's not a single-file database anymore) and there are a few drawbacks, but they don't seem to affect us.

It seems to have better concurrency (writers don't hold up readers, readers don't hold up writers) and allegedly better performance according to a bullet point on their docs site (I need to read more of it, I'm sure there's an elaboration).

Might help us out with the casefolding script?

@richvdh
Copy link
Member

richvdh commented Nov 24, 2021

related: matrix-org/synapse#2917 (comment)

@jdauphant
Copy link

jdauphant commented Mar 19, 2022

Apparently, there is nothing to change in the application to test it :

The persistence of WAL mode means that applications can be converted to using SQLite in WAL mode without making any changes to the application itself. One has merely to run "PRAGMA journal_mode=WAL;" on the database file(s) using the command-line shell or other utility, then restart the application.
https://sqlite.org/wal.html

Do you know somebody that use Sydent with SQLite with WAL journaling ?
Do you see any side effect that could append ?

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

No branches or pull requests

3 participants