On 2015.08.20 at 00:17:35 +0900, Tatsuo Ishii wrote: > > But once connection is established, each client works with one > > server (at least until communication failure occurs and it would call > > PQreset. In this case it has to reprepare statements anyway). > > One downside of this is, if one of the standby servers is not > responding, every time clients will be blocked by the server before > giving up the connection trial. This could last for hours (for
This shouldn't happen. My proposal was to connect all servers simultaneously, and then use that connection which would be established first closing other ones Even if we wouldn't do so (to properly randomize server load or to be compatible with jdbc), there is connection_timeout parameter, so client wouldn't seat and just wait for hours while system TCP/IP stack trying to connect nonexistent server. > example, the network cable is plugged out). I think round robin DNS is > better because the DNS server will drop the entry corresponding broken DNS server wouldn't drop anything unless explicitely told so (by administrator or by some watchdog software which is able to talk nsupdate protocol). And not everyone database owner has control on his own domain. Moreover, DNS is distributed system with agressive caching. If our system is not local, DNS records for non-existing server would be cached by DNS servers of client's internet provider. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers