<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<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=windows-1252">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<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">QGIS-Developer@lists.osgeo.org</a>
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>
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>
</pre>
</blockquote>
</body>
</html>