[Qgis-user] Readonly gpkg

Nyall Dawson nyall.dawson at gmail.com
Tue Jan 11 17:24:08 PST 2022


On Wed, 12 Jan 2022 at 11:00, Greg Troxel <gdt at lexort.com> wrote:
>
>
> <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.

Instead of exposing this as a per-workstation, QGIS only property, I'd
propose instead that the property be set somewhere in the gpkg
metadata itself, so that regardless of which user opens it in a
multi-user environment, they'll always get the property set by the db
administrator. (Maybe this could even become a future formal gpkg
extension...?)

Nyall



>
> > 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.
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


More information about the Qgis-user mailing list