[QGIS-Developer] QGIS + Cluster PostgreSQL

Bo Victor Thomsen bo.victor.thomsen at gmail.com
Sun Apr 25 07:30:52 PDT 2021


You could do that...

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.

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

Med venlig hilsen / Kind regards

Bo Victor Thomsen

Den 24-04-2021 kl. 12:14 skrev Tim Sutton:
> 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.
>
> Regards
>
> Tim
>
> Sent from my iPhone
>
>> On 24 Apr 2021, at 09:21, Bo Victor Thomsen 
>> <bo.victor.thomsen at gmail.com> wrote:
>>
>> 
>>
>> 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
>> _______________________________________________
>> 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/20210425/93b1aa84/attachment-0001.html>


More information about the QGIS-Developer mailing list