From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | Jimmy <jimmyjack(at)gmail(dot)com> |
Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_isready features |
Date: | 2016-06-17 06:09:40 |
Message-ID: | CAMsr+YHhhkSFnoYr=GPmioiZW3Hk8m54H=GWWW8TbnZDxCkxbA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 16 June 2016 at 00:40, Jimmy <jimmyjack(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2016-06-17 06:14:39 | Re: ERROR: ORDER/GROUP BY expression not found in targetlist |
Previous Message | Andreas Joseph Krogh | 2016-06-17 06:09:39 | Re: ERROR: ORDER/GROUP BY expression not found in targetlist |