[QGIS-Developer] QGIS + Cluster PostgreSQL

Bo Victor Thomsen bo.victor.thomsen at gmail.com
Sat Apr 24 01:21:04 PDT 2021


If I understand the situation correctly:

  * 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 ??
  * The main database gives a set of users read/write access the the
    main database
  * The replication database gives (another) set of users read-only
    access to data.

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.


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


However, The scenario makes only sense if the 2 databases is placed on 2 
different database servers.


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


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).



Med venlig hilsen / Kind regards

Bo Victor Thomsen

Den 22-04-2021 kl. 20:08 skrev Rebassa Oliver, Joan:
> Buenas tardes:
>
> 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.
>
> Gracias.
>
> Good afternoon:
>
> 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.
>
> Thanks.
>
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210424/71d1321d/attachment.html>


More information about the QGIS-Developer mailing list