Re: BUG #15168: "pg_isready -d" effectively ignores given database name

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: BUG #15168: "pg_isready -d" effectively ignores given database name
Дата
Msg-id CAKFQuwZ-onpo9B04Ziz6FEmq3iKttieGDni4Sp4YY7siigCt=g@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #15168: "pg_isready -d" effectively ignores given database name  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
On Tue, Apr 24, 2018 at 5:48 PM, jake <jakelist@zoho.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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: jake
Дата:
Сообщение: Re: BUG #15168: "pg_isready -d" effectively ignores given databasename
Следующее
От: Rick Gabriel
Дата:
Сообщение: Re: BUG #15170: PQtransactionStatus returns ACTIVE after Empty Commit