<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>You could do that...<br>
</p>
<p>However it would be another administrative job for the IT
department, where Postgres already is like: "Whuuut ! Dat's not a
database. It's not MS-SQLServer!!", so the KISS principle applies.
It's work enough simply to get Postgres/PostGIS installed as a
necessary component of a GIS infrastructure. <br>
</p>
<p>Anyway, most Postgres installations for GIS (that I have
installed) is like : 1 Postgres server, database server
optimizations, OGR import scripts and 2 user roles: "read_user"
and "write_user" to administer. Which in many cases are perfectly
fine :-)<br>
</p>
<pre class="moz-signature" cols="72">Med venlig hilsen / Kind regards
Bo Victor Thomsen</pre>
<div class="moz-cite-prefix">Den 24-04-2021 kl. 12:14 skrev Tim
Sutton:<br>
</div>
<blockquote type="cite"
cite="mid:F6338C8E-81B4-47FB-9A4F-8EC61E6C14A9@kartoza.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
Though I guess through service files you could present the RW
database to the editor roles and the RO database to the analyst
roles. That way you would not need duplicate layers.
<div><br>
</div>
<div>Regards </div>
<div><br>
</div>
<div>Tim<br>
<br>
<div dir="ltr">Sent from my iPhone</div>
<div dir="ltr"><br>
<blockquote type="cite">On 24 Apr 2021, at 09:21, Bo Victor
Thomsen <a class="moz-txt-link-rfc2396E" href="mailto:bo.victor.thomsen@gmail.com"><bo.victor.thomsen@gmail.com></a> wrote:<br>
<br>
</blockquote>
</div>
<blockquote type="cite">
<div dir="ltr">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<p>If I understand the situation correctly:</p>
<ul>
<li>You have a main database with access on port 5432 with
replication to another database with access on port
5433. Both databases on the same server ?? <br>
</li>
<li>The main database gives a set of users read/write
access the the main database</li>
<li>The replication database gives (another) set of users
read-only access to data.</li>
</ul>
<p>I've used the same setup in some cases: You have a small
number of editing users with read/write access to tables
on a "small" main database server. The data is then
replicated to a larger database server where a large
number of users have read-only access to the data. <br>
</p>
<p><br>
</p>
<p>The small "main" database server is optimised for editing
purposes. And the secondary database-server is optimised
for analytical purposes. The performance of the "main"
server will never be degraded by the - perhaps excessive -
use from the read-only user group. The replication can
even be delayed to times where the number of database
users is minimal <br>
</p>
<p><br>
</p>
<p>However, The scenario makes only sense if the 2 databases
is placed on 2 different database servers.</p>
<p><br>
</p>
<p>Your question: The answer is yes, QGIS supports access to
Postgres databases through different ports. However, for
the QGIS user it would look like 2 different layers, one
with read/write access to data and another layer with
read-only access to the data. The 2 layers will contain
the "same data" (Depending on how the replication is set
up). That's because you have to define 2 different Data
Sources, one for each database<br>
</p>
<p><br>
</p>
<p>It would make more sense to have 2 QGIS projects: A
"editing" project with one read/write layer (access to the
main database) and another QGIS project with one read-only
layer (access to the replication database).<br>
</p>
<p><br>
</p>
<p><br>
</p>
<pre class="moz-signature" cols="72">Med venlig hilsen / Kind regards
Bo Victor Thomsen</pre>
<div class="moz-cite-prefix">Den 22-04-2021 kl. 20:08 skrev
Rebassa Oliver, Joan:<br>
</div>
<blockquote type="cite"
cite="mid:AM7P191MB06638C7139C1A8D9F7514C77C1469@AM7P191MB0663.EURP191.PROD.OUTLOOK.COM">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<div style="font-family: Calibri, Arial, Helvetica,
sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Buenas tardes:<br>
</div>
<div>
<div dir="ltr">
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)"> <span
style="background-color:rgb(255,255,255);
display:inline!important"><br>
</span></div>
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)"> <span
style="background-color:rgb(255,255,255);
display:inline!important">Tenemos configurado un
cluster de base de datos de PostgreSQL de forma
que el nodo maestro de este cluster es el que
permite las operaciones de escritura en base de
datos a través del puerto 5432 y el resto de nodos
que forman el cluster son nodos esclavos a los que
se replican los cambios que se han hecho en el
maestro y asumen las operaciones de lectura en
base de datos por el puerto 5433, las aplicaciones
que han de acceder a las bases de datos deben
poder tener definidos dos datasources: uno para
las operaciones de escritura por el puerto 5432 y
otro para lectura por el puerto 5433, queremos
saber si Qgis soporta esta configuración.</span><br>
</div>
<div>
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)"> <br>
</div>
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)"> Gracias.</div>
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)"> <br>
</div>
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)"> Good afternoon:
<div><br>
</div>
<div>We have configured a PostgreSQL database
cluster so that the master node of this cluster
is the one that allows database write operations
through port 5432 and the rest of the nodes are
slave nodes, the changes that have been made in
the master are replicated to the slave nodes and
they assume the database read operations through
port 5433, the applications that have to access
the databases must have two datasources
configured: one for database write operations
(port 5432) and another for read operartions
(port 5433), we want to know if Qgis supports
this configuration.</div>
<div><br>
</div>
Thanks.<br>
</div>
<div id="x_Signature">
<div>
<div
style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)"> <br>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org" moz-do-not-send="true">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
</pre>
</blockquote>
<span>_______________________________________________</span><br>
<span>QGIS-Developer mailing list</span><br>
<span><a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a></span><br>
<span>List info:
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></span><br>
<span>Unsubscribe:
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></span><br>
</div>
</blockquote>
</div>
</blockquote>
</body>
</html>