Re:SQLite on macOS: Not ACID compliant with the bundled vers...
by simscitizen on Sunday March 10, 2024 @10:46AM
(#39659557)
From the linked thread, the Apple port is already doing the right thing in WAL mode which is what pretty much every SQLite client should be using these days [1]. Not sure why you’d be using delete journal mode in 2024 when WAL has existed for more than a decade now.
Re:SQLite on macOS: Not ACID compliant with the bundled vers...
by fulafel on Sunday March 10, 2024 @12:45PM
(#39660535)
It's not the default and in most use cases there's no pressing reason to change it. (Unless you know that Apple has broken the default mode data consistency guarantees...)
Secondarily there's also a list of disadvantages listed for the WAL mode in the SQLite docs, and some others besides, eg infinitely growing WAL files if there's always readers around.
Re:SQLite on macOS: Not ACID compliant with the bundled vers...
by simscitizen on Sunday March 10, 2024 @12:56PM
(#39660625)
I don’t remember if the system default was changed but the default for all databases created by Apple apps was switched to WAL mode in the iOS 4 timeframe.
The infinitely growing WAL problem is a real problem though. Often that is caused by devs accidentally leaking or abandoning a never closed read transaction. I think there’s a new wal2 mode in development to address that issue. Obviously the best solution for now is to not have such long lived readers in the first place.
[1] https://twitter.com/numist/status/1536830264214638593
https://www.sqlite.org/wal.html#persistence_of_wal_mode
Secondarily there's also a list of disadvantages listed for the WAL mode in the SQLite docs, and some others besides, eg infinitely growing WAL files if there's always readers around.
The infinitely growing WAL problem is a real problem though. Often that is caused by devs accidentally leaking or abandoning a never closed read transaction. I think there’s a new wal2 mode in development to address that issue. Obviously the best solution for now is to not have such long lived readers in the first place.