JDBC Postgres Failover with quorum based synchronous replication

Поиск
Список
Период
Сортировка
От Debraj Manna
Тема JDBC Postgres Failover with quorum based synchronous replication
Дата
Msg-id CAF6DVKMn3J04P2PW1gi4mwpQ1+Z6V_dKU4fpRwdZS8NXonx08g@mail.gmail.com
обсуждение исходный текст
Ответы Re: [External] JDBC Postgres Failover with quorum based synchronousreplication
Список pgsql-admin
Hi

Let's say I am using quorum based synchronous replication either ANY or FIRST in synchronous_standby_names

I am trying to read from slave as discussed here

jdbc:postgresql://node1,node2,node3/accounting?targetServerType=preferSlave&loadBalanceHosts=true

Can someone let me know 
  1. How does a slave is selected? Is a slave randomly selected or a slave is preferred which has zero lag or the minimum lag? 
  2. Is there any setting in jdbc url which will only select the slave with zero replication and if no such slave exists then read will be sent to master ?
Thanks,



В списке pgsql-admin по дате отправления:

Предыдущее
От: Rui DeSousa
Дата:
Сообщение: Re: How to get current timeline of host in postgres 10.4?
Следующее
От: Vijaykumar Jain
Дата:
Сообщение: Re: [External] JDBC Postgres Failover with quorum based synchronousreplication