|Title:||-wal -shm files are not removed after last connection is closed|
|Last Modified:||2018-12-22 19:45:59|
|Version Found In:||184.108.40.206|
anonymous added on 2018-10-18 15:06:56:
We noticed -wal -shm journal files are not removed from the filesystem when you close the last SQLiteConnection to db file. After some analysis we found this happens when the last closed connection is readonly. The workaround is - after you close all the connections, create one new writable connection and close it immediately.
mistachkin added on 2018-12-22 19:45:59:
Paraphrased the WAL documentation: [https://www.sqlite.org/wal.html] It was not possible to open read-only WAL databases. Beginning with version 3.22.0 (2018-01-22), a read-only WAL-mode database file can be opened if the -shm and -wal files already exists or those files can be created or the database is immutable.