[Qgis-user] Readonly gpkg

Greg Troxel gdt at lexort.com
Tue Jan 11 16:59:48 PST 2022


<pergler at gmail.com> writes:

> A. Ideally WAL/DELETE would be a connection (in the sense of the
> Browser connections list) level decision changeable by the user, not a
> layer-level decision and not (as now) an application setting used for
> all gpkg connections.

Fundamentally WAL/DELETE is a (changeable) property of an sqlite3 file,
and thus of a geopackage container.  So exposing it as a db browser
property and allowing it to be changed, with a warning that it is a DB
Admin operation, not a connection operation, seems ok.

> In the distant future, I could see the Browser providing a UI wrapper
> to send the right pragma JOURNAL_MODE if user requests.

Yes, that makes sense.



> B. Currently, one option would be for me/others to set
> qgis/walForSqlite to false, which would solve the problem for readonly
> gpkgs and only slightly downgrade performance for (modest-sized)
> writeable gpkg primarily edited via the canvas.

I think so.  It would also fix the bug that reading a geopackage layer
causes a write operation to the filesystem.

However, it would have a bug that if someone had set a geopackage to
WAL, then this would reset it back to DELETE.

> C. Alternately, continuing to let QGIS use WAL, but setting the
> specific .gpkg file to be read-only in the file system is a harmless
> if crude solution (as long as I have no intention of actually editing
> the layers in that gpkg).

Probably, but I do want to edit.  I just don't want a fs write unless I
actually do so.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220111/b6a894cd/attachment.sig>


More information about the Qgis-user mailing list