Re: High Availability, guarantee to use sync nodes

Поиск
Список
Период
Сортировка
От Maksim Milyutin
Тема Re: High Availability, guarantee to use sync nodes
Дата
Msg-id 211b2c1e-8cdc-0ba7-fd8d-c8e13c3685a6@gmail.com
обсуждение исходный текст
Ответ на High Availability, guarantee to use sync nodes  (Dirk Krautschick <Dirk.Krautschick@trivadis.com>)
Список 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 по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: How bad is using queries with thousands of values for operators IN or ANY?
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: How bad is using queries with thousands of values for operators IN or ANY?