System.Data.SQLite
View Ticket
Not logged in
Ticket UUID: 0ee891062d55628e2e608ece3361853215377641
Title: -wal -shm files are not removed after last connection is closed
Status: Closed Type: Incident
Severity: Important Priority: Blocker
Subsystem: Native_Assembly Resolution: Works_As_Designed
Last Modified: 2018-12-22 19:45:59
Version Found In: 1.0.108.0
User Comments:
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.