Re: [QGIS-Developer] gpkg syncing issue

2019-03-13 Thread Paolo Cavallini
nothing to do with multiwrite, but with backupping and syncing.
I have a dir of shp that I sync with a couple of servers, and I
incrementally backup the dir. All fine and efficient. With gpkg the
packages will be saved over and over again even if unchanged.
this is a very serious limitation in professional contests, IMHO.
Cheers.

On 13/03/19 18:01, Daniele Viganò wrote:
> That comes from the fact that a GeoPackage is essentially an SQLite DB,
> and SQLite 3 uses WAL by default [1]
> 
> See Even reply for workarounds. Anyway SQLite is not meant to be used
> with multiple writing processes.
> 
> Cheers,
> Daniele
> 
> [1] https://www.sqlite.org/wal.html
> 
> On Wed, Mar 13, 2019 at 5:44 PM Paolo Cavallini  > wrote:
> 
> Hi all,
> when a geopackage is opened in QGIS, even if no change is made, the file
> is marked as changed. This can cause nightmares when syncing data,
> because if two users open a gpkg without editing, it is hard to decide
> what to do. Same for backups.
> Is there a way to avoid this?
> Thanks.
> -- 
> Paolo Cavallini - www.faunalia.eu 
> QGIS.ORG  Chair:
> http://planet.qgis.org/planet/user/28/tag/qgis%20board/
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org 
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
> 
> 
> -- 
> *Daniele Viganò*
> http://daniele.vigano.me
> 
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

-- 
Paolo Cavallini - www.faunalia.eu
QGIS.ORG Chair:
http://planet.qgis.org/planet/user/28/tag/qgis%20board/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] gpkg syncing issue

2019-03-13 Thread Daniele Viganò
That comes from the fact that a GeoPackage is essentially an SQLite DB, and
SQLite 3 uses WAL by default [1]

See Even reply for workarounds. Anyway SQLite is not meant to be used with
multiple writing processes.

Cheers,
Daniele

[1] https://www.sqlite.org/wal.html

On Wed, Mar 13, 2019 at 5:44 PM Paolo Cavallini 
wrote:

> Hi all,
> when a geopackage is opened in QGIS, even if no change is made, the file
> is marked as changed. This can cause nightmares when syncing data,
> because if two users open a gpkg without editing, it is hard to decide
> what to do. Same for backups.
> Is there a way to avoid this?
> Thanks.
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS.ORG Chair:
> http://planet.qgis.org/planet/user/28/tag/qgis%20board/
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



-- 
*Daniele Viganò*
http://daniele.vigano.me
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] gpkg syncing issue

2019-03-13 Thread Paolo Cavallini
Hi Even,

On 13/03/19 17:53, Even Rouault wrote:
> Yes this is a known inconvenience (pretty sure there might be bugs open on 
> this) due to opening GPKG files in write-ahead mode, so as to avoid issues in 
> case of concurrent editing (probably helps also in situations of single 
> editing where one thread does writing, and others are reading)
> 
> You can set the OGR_SQLITE_JOURNAL = DELETE environment variable, or the qgis/
> walForSqlite3 = false setting to avoid that (but run in the possible above 
> mentionned issues)

thanks for the detailed and prompt explanation. So, the old shp strikes
back, far more convenient in this situation, unfortunately.
Regards.

-- 
Paolo Cavallini - www.faunalia.eu
QGIS.ORG Chair:
http://planet.qgis.org/planet/user/28/tag/qgis%20board/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] gpkg syncing issue

2019-03-13 Thread Even Rouault
On mercredi 13 mars 2019 17:44:11 CET Paolo Cavallini wrote:
> Hi all,
> when a geopackage is opened in QGIS, even if no change is made, the file
> is marked as changed. This can cause nightmares when syncing data,
> because if two users open a gpkg without editing, it is hard to decide
> what to do. Same for backups.
> Is there a way to avoid this?

Yes this is a known inconvenience (pretty sure there might be bugs open on 
this) due to opening GPKG files in write-ahead mode, so as to avoid issues in 
case of concurrent editing (probably helps also in situations of single 
editing where one thread does writing, and others are reading)

You can set the OGR_SQLITE_JOURNAL = DELETE environment variable, or the qgis/
walForSqlite3 = false setting to avoid that (but run in the possible above 
mentionned issues)

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] gpkg syncing issue

2019-03-13 Thread Paolo Cavallini
Hi all,
when a geopackage is opened in QGIS, even if no change is made, the file
is marked as changed. This can cause nightmares when syncing data,
because if two users open a gpkg without editing, it is hard to decide
what to do. Same for backups.
Is there a way to avoid this?
Thanks.
-- 
Paolo Cavallini - www.faunalia.eu
QGIS.ORG Chair:
http://planet.qgis.org/planet/user/28/tag/qgis%20board/
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer