[QGIS-Developer] PostgreSQL connection - more than one DB host

Andreas Neumann a.neumann at carto.net
Tue May 21 00:47:37 PDT 2019


Hi, 

According to the libpq documentation it is possible to specify more than
one host for PG connections. 

See https://www.postgresql.org/docs/current/libpq-connect.html  -->
section 34.1.1.2. Connection URIs 

----------- 

It is possible to specify multiple host components, each with an
optional port component, in a single URI. A URI of the form
postgresql://host1:port1,host2:port2,host3:port3/ is equivalent to a
connection string of the form host=host1,host2,host3
port=port1,port2,port3. Each host will be tried in turn until a
connection is successfully established. 

------------- 

Is this option to specify more than one host supported by QGIS and if
yes, how? It would only make sense for read-only connections, I think. 

Thanks,
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190521/8ea30a2f/attachment.html>


More information about the QGIS-Developer mailing list