On Tue, Apr 26, 2016 at 10:56 PM, J Decker <d3ck0r at gmail.com> wrote:
> https://www.sqlite.org/wal.html
>
> "5. It is not possible to open read-only WAL databases. The opening
> process must have write privileges for "-shm" wal-index shared memory
> file associated with the database, if that file exists, or else write
> access on the directory containing the database file if the "-shm"
> file does not exist."
>
> second, I'm pretty sure that WAL mode is written to the database, so
> it remembers what journal mode it was using... which if it wasn't WAL
> would require writing to the database.

more from wal.html

"Persistence of WAL mode

Unlike the other journaling modes, PRAGMA journal_mode=WAL is
persistent. If a process sets WAL mode, then closes and reopens the
database, the database will come back in WAL mode. In contrast, if a
process sets (for example) PRAGMA journal_mode=TRUNCATE and then
closes and reopens the database will come back up in the default
rollback mode of DELETE rather than the previous TRUNCATE setting.

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.

The WAL journal mode will be set on all connections to the same
database file if it is set on any one connection."

Reply via email to