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 28392.1495040248@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  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> I suggest that we need to conditionalize the decision based on what
>> SQLSTATE is reported.  Not sure offhand if it's better to have a whitelist
>> of SQLSTATEs that allow failing over to the next server, or a blacklist of
>> SQLSTATEs that don't.

> No particular comment on this.  I do wonder about forward/backwards
> compatibility in such lists and if SQLSTATE really covers all
> cases/distinctions which are interesting when it comes to making this
> decision.

If the server is reporting the same SQLSTATE for server-down types
of conditions as for server-up, then that's a bug and we need to change
the SQLSTATE assigned to one case or the other.  The entire point of
SQLSTATE is that it should generally capture distinctions as finely
as client software is likely to be interested in.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Surafel Temesgen
Date:
Subject: Re: [HACKERS] Disallowing multiple queries per PQexec()
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternativehosts when some errors occur