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

From Michael Paquier
Subject Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternativehosts when some errors occur
Date
Msg-id CAB7nPqR8Fus04h=+KUDidBqxmsK0iKHW64ux_Qqo38oL7WcW3Q@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternativehosts when some errors occur  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Responses Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternativehosts when some errors occur  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Thu, May 18, 2017 at 5:05 PM, Tsunakawa, Takayuki
<tsunakawa.takay@jp.fujitsu.com> wrote:
> So, how about trying connection to the next host when the class code is neither 28, 3D, nor 42?
>
> Honestly, I'm not happy with this approach, for a maintenance reason that others are worried about.  Besides, when
theconnection target is not postgres and returns invalid data, no SQLSTATE is available.  I'm sorry to repeat myself,
butI believe PgJDBC's approach is practically good.  If you think the SQLSTATE is the only way to go, I will put up
withit.  It would be disappointing if nothing is done. 

FWIW, I am of the opinion to not have an implementation based on any
SQLSTATE codes, as well as not doing something similar to JDBC.
Keeping things simple is one reason, a second is that the approach
taken by libpq is correct at its root.
--
Michael



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: [HACKERS] transition table behavior with inheritance appearsbroken (was: Declarative partitioning - another take)
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] UPDATE of partition key