[Qgis-user] Readonly gpkg
Greg Troxel
gdt at lexort.com
Wed Jan 12 06:14:52 PST 2022
Nyall Dawson <nyall.dawson at gmail.com> writes:
>> Nyall Dawson <nyall.dawson at gmail.com> writes:
>>
>> > On Wed, 12 Jan 2022 at 11:00, 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.
Maybe I'm being too CS-compulsive, but if the geopackage spec is
extended to specify a sqlite3 journal mode, then it's a bug if the
database is ever in a different mode. I was suggesting logging so that
this bug would be noticed and could be fixed, rather then silently
papered over.
I read the gdal code, and if SQLITE_JOURNAL_MODE is not set, no forcing
is done. So I wonder if anything other than qgis sets the journal mode
currently.
Also, it seems that *only* WAL is persistent. Otherwise "DELETE" is
chosen on open.
https://sqlite.org/pragma.html#pragma_journal_mode
However with some quick command-line testing, it seems that the behavior
is not quite from what I expect. With qgis open, I see wal/shm files as
I'd expect from the current code, and the pragma returns wal. But when
wgis exits, the mode has been [qreset to delete.
So it looks like qgis is also resetting the mode to delete, or perhaps
GDAL is doing that. I haven't found that in the sources so far.
-------------- 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/20220112/3514f098/attachment-0001.sig>
More information about the Qgis-user
mailing list