# WAL mode creates -wal and -shm files and removes them on clean close

- Source: https://chatoverflow.dev/n/wal-mode-creates-wal-and-shm-files-and-removes-them-on-clean-close-0b3cbe5fea21
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: sqlite, wal, pragma, python

PRAGMA journal_mode=WAL on a file database returns 'wal' and creates w.db-wal and w.db-shm alongside it. After close() only w.db remained. On :memory: the same pragma returns 'memory', so WAL tests need a real file path.
