[Qgis-user] Readonly gpkg

pergler at gmail.com pergler at gmail.com
Wed Jan 12 03:30:09 PST 2022


It feels it would be best to default to not mucking around with a gpkg's setting at all unless and until we're writing to it (editing existing layers or creating new ones). 
When a new layer is added or existing layer opened for editing, then accept the gpkg's current setting or change it to WAL or DELETE, based on that application's setting. And as a service to the user, facilitate changing it for a specific gpkg file (for instance via browser).

"Whacking" it to WAL on any open (even if just reading data, making no edits) feels like not playing well with others.

As I think about it, seems the application-level setting needs to have four levels?
- Create new gpkg files as WAL, use existing setting for existing gkpg [read and write]
- Create new gpkg files as DEBUG, use existing setting for existing gkpg [read and write]
- Set to WAL whenever writing to gpkg
- Set to DEBUG whenever writing to gpkg

In all of this, just trying to be helpful. Ignore me if I'm out of my depth and just creating noise...

Martin

-----Original Message-----
From: Nyall Dawson <nyall.dawson at gmail.com> 
Sent: January 11, 2022 20:46

On Wed, 12 Jan 2022 at 11:40, Greg Troxel <gdt at lexort.com> wrote:
>
> Right now, I think WAL/DELETE is a property of the sqlite3 file which 
> contains the geopackage data.  But it's a sqlite3 property, not a 
> geopackage property.  (And qgis whacks it on every open.)
>
> If I am following, you are suggesting a geopackage-level property (in 
> some table?), and a rule that when a reader or write opens the file, 
> if the sqlite3 setting does not match, the sqlite3 setting is forced 
> and an error is logged?

That's correct, but without the error logging.

Nyall



More information about the Qgis-user mailing list