Re: pg_isready features - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: pg_isready features
Date
Msg-id CAMsr+YHhhkSFnoYr=GPmioiZW3Hk8m54H=GWWW8TbnZDxCkxbA@mail.gmail.com
Whole thread Raw
In response to Re: pg_isready features  (Jimmy <jimmyjack@gmail.com>)
List pgsql-hackers
On 16 June 2016 at 00:40, Jimmy <jimmyjack@gmail.com> wrote:

(1) I can (and do) use psql, pg_isready seems lighter and since it already supports credentials and DB name, I see very little harm for pg_isready to say back whether user logged IN or not using these credentials.


(2) timeout is not the same - timeout does not retry, its a simple timeout in case connection hangs, try it

That threw me recently, too.

If your DB is in recovery, pg_isready with a long timeout won't wait until it's accepting normal user connections or until timeout. There's no way to get that behaviour without a shell script loop or similar.

So yeah, +1 for this.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: 10.0
Next
From: Andreas Joseph Krogh
Date:
Subject: Re: ERROR: ORDER/GROUP BY expression not found in targetlist