JDBC Postgres Failover with quorum based synchronous replication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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,




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux