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

From Tsunakawa, Takayuki
Subject Re: [HACKERS] [bug fix] PG10: libpq doesn't connect to alternativehosts when some errors occur
Date
Msg-id 0A3221C70F24FB45833433255569204D1F6FA5DE@G01JPEXMBYT05
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>)
List pgsql-hackers
From: Michael Paquier [mailto:michael.paquier@gmail.com]
> Does JDBC use something like that to make a difference between a failure
> and a move-on-to-next-one? 

No, it just tries the next host.  See the first while loop in org/postgresql/jdbc/core/v3/ConnectionFactoryImpl.java.


> From maintenance point of view, this would
> require lookups each time a new SQLSTATE is added. Not sure that people
> would remember that.

Yes, I have the same concern, but I'll see if there's a good way anyway (e.g. whether we can simply use the class code
ofthe SQLSTATE, which seems hopeless.)  I guess PgJDBC's way is practical and sensible in the end.
 

Regards
Takayuki Tsunakawa



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: [HACKERS] Removal of plaintext password type references
Next
From: Masahiko Sawada
Date:
Subject: Re: [HACKERS] [Proposal] Allow users to specify multiple tables inVACUUM commands