Jürgen E. Fischer <j...@norbit.de> writes: > On Tue, 11. Jan 2022 at 09:10:57 -0500, perg...@gmail.com wrote: >> I've tried making the gpkg read-only, which hasn't crashed anything in brief >> testing and generates no warnings. However, it feels risky, and clearly QGIS >> or OGR aren't fully happy, since the temporary shm and wal files don't get >> deleted on exit. So I'm hesitant to continue doing this for fear of a crash >> when I'm actually doing something useful. > > We do the same with world_map.gpkg - see > https://github.com/qgis/QGIS/issues/35383.
I had seen that (NetBSD 9, pkgsrc, qgis 3.16.x) and wondered if it was a packaging error I should look into. Now I understand. I have long found it problematic that the wal/shm files exist and persist for long periods, and that gpkd files I don't intend to change are modified at the OS level. It strikes me that the basic bug needs one of two things: 1) The geopackage driver should have a read-only access mode, and qgis should start out that way, trying to change to read/write only when the user hits the edit button on one of the layers. And, if the file is read only, there should be a nice error like "can't make this layer writable" and the toggle to write should fail. With this option, there perhaps needs to be some kind of lock outside of sqlite, which can be multireader and single writer. 2) somehow, the geopackage layer could hide all this and logically open the layer read/write, but refrain from writing to the filesystem. Then, when there is an actual write, the db open-for-write can happen. After the database is written, if no layers [are editable]or[have unwrittend changes] for some period of time (5m?) the database should be changed back to read only. This is sort of like 1 but at the gdal layer vs the qgis layer. Because of this I'm starting to think about moving all my data into postgis, and not use geopackages any more.
signature.asc
Description: PGP signature
_______________________________________________ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user