Re: pg_isready bug - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: pg_isready bug
Date
Msg-id 20200414003337.GB1492@paquier.xyz
Whole thread Raw
In response to Re: pg_isready bug  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-bugs
On Mon, Apr 13, 2020 at 04:17:21PM +0200, Fabien COELHO wrote:
> Basically a connection is merely attempted, but it does not report success
> of said connection. The sentence of "pg_isready --help" is somehow
> ambiguous:
>
> "pg_isready issues a connection check to a PostgreSQL database.", but no one
> specified whaa a "connection check" is. I can understand that you would
> expect to be an actual connection:-)
>
> ISTM that the doc should be clarified about what is a "connection check",
> and that it is not working a connection.

Yeah, that matches my impression when reading this thread.  Perhaps
the docs had better emphasize that --timeout is a simple mapping for
the connection parameter connect_timeout in this case?  My point is
that the logic tells us that the timeout is in effect when a
connection has been started, but not completed yet.  And the docs of
pg_isready tell us that:
"The maximum number of seconds to wait when attempting connection
before returning that the server is not responding."

So this does not really insist on the point that a timeout has no
effect on a connection immediately failing because of an incorrect
parameter set.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: backend crash
Next
From: Leonardo Lao
Date:
Subject: Error al iniciar postgresql con /etc/init.d/postgresql start