<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi all,</p>
<p>We had the same experience in a project of ours. Multiple users
with read-only access to a gpkg on a (Windows) network share. The
results were freezes on unloading the layer (e.g. closing QGIS or
opening another project) on system A until system B would have
closed the QGIS layer there. The behavior seemed surprising to me
and on first sight I'd have put it more into the category "bug"
rather than "feature".<br>
</p>
<p>Good news, this behavior could be changed by switching the sqlite
journal mode to delete (environment variable <span
class="blob-code-inner blob-code-marker" data-code-marker="+"><span
class="pl-c">OGR_SQLITE_JOURNAL=DELETE).</span></span></p>
<p>QGIS and OGR use gpkg in WAL mode by default. Fun fact: this is
not supported on network drives, as documented on
<a class="moz-txt-link-freetext" href="https://www.sqlite.org/wal.html">https://www.sqlite.org/wal.html</a> :<br>
</p>
<p>> All processes using a database must be on the same host
computer; WAL does not work over a network filesystem <br>
</p>
<p>I did not test what happens if only *some* of the accessing
systems use DELETE and others use WAL, nor did I check what
happens when writing to the DB while reading (or even concurrent
writes - which definitely no longer is a safe operation mode for
sqlite on a shared network volume <- if you end up in this
category, get a postgres server).</p>
<p>Maybe we need to rethink the default mode of opening gpkg's<br>
and if anyone can provide ground truth on the untested operation
modes mentioned before, please share the results here.<br>
</p>
<p>Bests, Matthias<br>
</p>
<div class="moz-cite-prefix">On 10/18/19 8:17 AM, Chavoux Luyt
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAPGeeiEBpDbdD9vRN3siXc=n0SAD1oqHY7sJ-k_cSvZX2acRiw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div>Hi,</div>
<div dir="auto"><br>
</div>
<div dir="auto">Just my two cents... this is IMHO exactly where
postGIS will shine. Using PostgreSQL as backend will avoid any
of these issues (i.e. prevent data corruption). For my
personal projects I have never bothered with it, so I cannot
say how easy it is to set up, but once it is up and running
PostgreSQL is one of the most reliable database servers out
there.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Cheers,</div>
<div dir="auto">Chavoux<br>
<br>
<div class="gmail_quote" dir="auto">
<div dir="ltr">On Thu, 17 Oct 2019, 21:01 , <span
style="background-color:rgb(255,255,255);font-family:Calibri,Helvetica,sans-serif">----------
Forwarded message ----------</span></div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">From: Francesco
Pelullo <<a href="mailto:f.pelullo@gmail.com"
target="_blank" rel="noreferrer" moz-do-not-send="true">f.pelullo@gmail.com</a>><br>
To: Patrick Dunford <<a
href="mailto:enzedrailmaps@gmail.com" target="_blank"
rel="noreferrer" moz-do-not-send="true">enzedrailmaps@gmail.com</a>><br>
Cc: <a href="mailto:qgis-user@lists.osgeo.org"
target="_blank" rel="noreferrer" moz-do-not-send="true">qgis-user@lists.osgeo.org</a><br>
Bcc: <br>
Date: Thu, 17 Oct 2019 13:09:43 +0200<br>
Subject: Re: [Qgis-user] GeoPackage deadlocks (Andrea
Peri)<br>
<div dir="auto">
<div><br>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Il gio 17 ott
2019, 12:54 Patrick Dunford <<a
href="mailto:enzedrailmaps@gmail.com"
target="_blank" rel="noreferrer"
moz-do-not-send="true">enzedrailmaps@gmail.com</a>>
ha scritto:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">It's
not a network issue and neither is it a Windows
issue. Two <br>
processes accessing geopackage on a local computer
can run into the same <br>
issue. SQlite is designed for a single user. It is
very reliable when <br>
used as </blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
</body>
</html>