Re: High Availability, guarantee to use sync nodes - Mailing list pgsql-general

From Maksim Milyutin
Subject Re: High Availability, guarantee to use sync nodes
Date
Msg-id 211b2c1e-8cdc-0ba7-fd8d-c8e13c3685a6@gmail.com
Whole thread Raw
In response to High Availability, guarantee to use sync nodes  (Dirk Krautschick <Dirk.Krautschick@trivadis.com>)
List pgsql-general

On 31.08.2020 14:06, Dirk Krautschick wrote:

Hi all,


Hi

 

if there are several PostgreSQL nodes replicating synchronous and I configure a guarantee that

for example 3 of 5 nodes have to be in sync to go on with synchronous_standby_names and

now I want to implement a load balancing scenario with active standby DBs…how or with what

tool can I achieve that my read clients only use sync nodes. For sure somehow a check in the

pg_stat_replication before is possible but is there something in parameters or with solutions

like repmgr, patroni, etc. to do this?


For such tools as patroni or stolon the list of sync replicas could be got from DCS storage (etcd, consul, etc). Your application or some proxy, e.g. haproxy with confd, might extract the list of sync nodes, subscribe on changes in KV entry that stores this list and routes queries according it.


-- 
Regards,
Maksim Milyutin

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: How bad is using queries with thousands of values for operators IN or ANY?
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: How bad is using queries with thousands of values for operators IN or ANY?