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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur
Дата
Msg-id 28392.1495040248@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternativehosts when some errors occur  (Stephen Frost <sfrost@snowman.net>)
Список 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 по дате отправления:

Предыдущее
От: Surafel Temesgen
Дата:
Сообщение: Re: [HACKERS] Disallowing multiple queries per PQexec()
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternativehosts when some errors occur