diff options
author | eta <eta@theta.eu.org> | 2020-10-04 13:54:11 +0100 |
---|---|---|
committer | Marvin W <git@larma.de> | 2020-10-06 18:05:25 +0200 |
commit | 9cc3382abe801f0be96b79dcfc9cd4ac0272befa (patch) | |
tree | 8b2c362e94f49f023216aae0fb8f5b122d51d9ab /main/src/ui/conversation_selector | |
parent | 7b58c1596aa13a7ef0dd7897e25f9a80c5929a07 (diff) | |
download | dino-9cc3382abe801f0be96b79dcfc9cd4ac0272befa.tar.gz dino-9cc3382abe801f0be96b79dcfc9cd4ac0272befa.zip |
service/database: use WAL mode + safe PRAGMA synchronous setting
Setting PRAGMA synchronous = 0 is really unsafe, and leads to database
corruption (which I've personally experienced). This commit uses
SQLite's Write-Ahead Log (WAL) [1] instead, together with synchronous =
NORMAL. According to [1], this trades off performance for durability
(i.e. it's possible that some transactions may not have committed if the
power gets lost), but still guarantees that the database won't corrupt
itself.
Together, these changes should improve reliability whilst either
improving or having no effect on performance.
[1]: https://www.sqlite.org/wal.html
Diffstat (limited to 'main/src/ui/conversation_selector')
0 files changed, 0 insertions, 0 deletions