From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | jake <jakelist(at)zoho(dot)com> |
Cc: | "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #15168: "pg_isready -d" effectively ignores given database name |
Date: | 2018-04-25 01:27:07 |
Message-ID: | CAKFQuwZ-onpo9B04Ziz6FEmq3iKttieGDni4Sp4YY7siigCt=g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Tue, Apr 24, 2018 at 5:48 PM, jake <jakelist(at)zoho(dot)com> wrote:
> After discussing this with the Lead Developer of Snowdrift.coop, I'd like
> to humbly suggest that the specification be slightly adjusted to remove the
> surprising aspect.
>
I'd argue that you would spell that:
psql -c 'SELECT 1;'
or (with maybe a more useful select-list, like version, to reinforce you
are where you think you are), with whatever options and environment you
wish tacked onto it.
Turning something that today that conforms to the spec and results in
success into a failure is generally undesirable.
I'd be more inclined to modify pg_isready to simply ignore any
user/password/database arguments in the environment, and remove them from
the command line spec (or document them as being ignored since they are
accepted today), if that is possible. Then the API and its charter would
match AND you'd avoid the spurious FATAL in the log.
For the spec you describe a new utility command would likely be a better
solution.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Rick Gabriel | 2018-04-25 04:02:13 | Re: BUG #15170: PQtransactionStatus returns ACTIVE after Empty Commit |
Previous Message | jake | 2018-04-25 00:48:14 | Re: BUG #15168: "pg_isready -d" effectively ignores given database name |