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

From: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
To: 'Michael Paquier' <michael(dot)paquier(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bug fix] PG10: libpq doesn't connect to alternative hosts when some errors occur
Date: 2017-05-12 08:43:23
Message-ID: 0A3221C70F24FB45833433255569204D1F6F58D7@G01JPEXMBYT05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: Michael Paquier [mailto:michael(dot)paquier(at)gmail(dot)com]
> 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.

But PgJDBC behaves as expected -- attempt another connection to other hosts (and succeed). I believe that's what users would naturally expect. The current libpq implementation handles only the socket-level connect failure.

Regards
Takayuki Tsunakawa

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tsunakawa, Takayuki 2017-05-12 08:54:13 Re: [doc fix] PG10: wroing description on connect_timeout when multiple hosts are specified
Previous Message Thomas Kellerer 2017-05-12 08:35:20 Re: CTE inlining