Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur
Date
Msg-id 16162.1494596652@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternativehosts when some errors occur  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternativehosts when some errors occur
List pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> writes:
> On Fri, May 12, 2017 at 1:28 PM, Tsunakawa, Takayuki
> <tsunakawa.takay@jp.fujitsu.com> wrote:
>> Likewise, when the first host has already reached max_connections, libpq doesn't attempt the connection aginst later
hosts.

> It seems to me that the feature is behaving as wanted. Or in short
> attempt to connect to the next host only if a connection cannot be
> established. If there is a failure once the exchange with the server
> has begun, just consider it as a hard failure. This is an important
> property for authentication and SSL connection failures actually.

I would not really expect that reconnection would retry after arbitrary
failure cases.  Should it retry for "wrong database name", for instance?
It's not hard to imagine that leading to very confusing behavior.
        regards, tom lane



pgsql-hackers by date:

Previous
From: "K S, Sandhya (Nokia - IN/Bangalore)"
Date:
Subject: Re: [HACKERS] [BUGS] Crash observed during the start of the Postgres process
Next
From: Neha Khatri
Date:
Subject: Re: [HACKERS] If subscription to foreign table valid ?