Re: Proposal: Implement failover on libpq connect level.

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Victor Wagner <vitus@wagner.pp.ru>
Cc: pgsql-hackers@postgresql.org
Date: 2015-08-19T18:11:31Z
Lists: pgsql-hackers
Victor Wagner <vitus@wagner.pp.ru> writes:
> On 2015.08.20 at 00:17:35 +0900, Tatsuo Ishii wrote:
>> 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

That seems like seriously unfriendly behavior.  It will trigger dropped
connection bleats in the server logs, not to mentioned wasted process
forks.

			regards, tom lane


Commits

  1. libpq: Add target_session_attrs parameter.

  2. Remove superuser checks in pgstattuple

  3. Fix unwanted flushing of libpq's input buffer when socket EOF is seen.