In QGIS, if I open some GeoPackage file like
mylayers.gpkg, it will create two files named
mylayers.gpkg-wal in the same folder. After I close QGIS, these files disappear. I understand that they are temporary files, but I wonder what their purpose is.
SQLite supports different mechanics to achieve this, and the QGIS specific GPKG implementation defaults to Write Ahead Logging (WAL), available in SQLite > 3.7, where
*.gpkg-walfile holds the WAL for the current connection; this file keeps a progressive data log of the transactional state of the DB between
*.gpkg-shmSHhared Memory file manages concurrent access to the DB via an index to the WAL