SQLite Forum

WAL files deleted
Login
The -wal and -shm files should always be deleted when closing the last connection to a database in WAL mode unless the connection has been configured not to do so by using the `sqlite3_file_control` API specifying to not delete the WAL with the `SQLITE_FCNTL_PERSIST_WAL` option for every connection to the database file.

<https://sqlite.org/c3ref/file_control.html>

The `SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE` option to the `sqlite3_db_config` will also probably result in the -wal and -shm not being deleted if it is applied to every connection to the database.  

<https://sqlite.org/c3ref/db_config.html>

Are you using one of these options and it is no longer working correctly or are you not using one of these options every time and observing that a previously existing bug may have been fixed?