INSPIRE-MIF / gp-geopackage-encodings

Good practice for GeoPackage encodings of INSPIRE datasets
7 stars 4 forks source link

opening a GeoPackage in QGIS (WAL) #3

Closed heidivanparys closed 3 years ago

heidivanparys commented 3 years ago

With the default QGIS settings, when a GeoPackage file is opened, two extra files are created as well, a gpkg-wal and a gpkg-shm file. It has something to do with a feature of SQLite called Write-Ahead Log (WAL), see also https://www.sqlite.org/wal.html. In certain situations that may give issues. See e.g. https://www.mail-archive.com/qgis-user@lists.osgeo.org/msg45132.html and http://osgeo-org.1560.x6.nabble.com/Re-Something-to-think-about-GeoPackage-and-WAL-td5303139.html.

As pointed out in the links above, a possible solution is to add configuration option OGR_SQLITE_JOURNAL=DELETE to QGIS (and then restart QGIS), then WAL will not be used any more for the GeoPackage file and the gpkg-wal and gpkg-shm files will not be created.

screenshot

Documentation seems to be rather scarce on that configuration option, so I thought I would point this out here, as part of the knowledge sharing, until it is properly documented somewhere (e.g. in the QGIS documentation).

heidivanparys commented 3 years ago

Pull request created for the GDAL documentation on the GeoPackage driver: https://github.com/OSGeo/gdal/pull/3897.