pg_isready --username seems an empty promise

Started by Erik Rijkersover 11 years ago3 messages
#1Erik Rijkers
er@xs4all.nl

pg_isready has --username:

-U, --username=USERNAME user name to connect as

so is replying when given a non-existent user not a bug?

pg_isready --username=xxxx -p 6544
/tmp:6544 - accepting connections

There is no user xxxx. (PG envvars are removed)

Thanks,

Erik Rijkers

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Heikki Linnakangas
hlinnakangas@vmware.com
In reply to: Erik Rijkers (#1)
Re: pg_isready --username seems an empty promise

On 05/19/2014 01:37 PM, Erik Rijkers wrote:

pg_isready has --username:

-U, --username=USERNAME user name to connect as

so is replying when given a non-existent user not a bug?

pg_isready --username=xxxx -p 6544
/tmp:6544 - accepting connections

There is no user xxxx. (PG envvars are removed)

Per the manual page on pg_isready:

The options --dbname and --username can be used to avoid gratuitous
error messages in the logs, but are not necessary for proper
functionality.

The libpq entry on PQpingParams(), which pg_isready uses, has a bit more
details:

It is not necessary to supply correct user name, password, or
database name values to obtain the server status; however, if
incorrect values are provided, the server will log a failed
connection attempt.

BTW, I find the above PQpingParams() explanation much more clear than
one in pg_isready. I think we should use the same text in both places.

- Heikki

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Bruce Momjian
bruce@momjian.us
In reply to: Heikki Linnakangas (#2)
Re: pg_isready --username seems an empty promise

On Mon, May 19, 2014 at 02:22:12PM +0300, Heikki Linnakangas wrote:

On 05/19/2014 01:37 PM, Erik Rijkers wrote:

pg_isready has --username:

-U, --username=USERNAME user name to connect as

so is replying when given a non-existent user not a bug?

pg_isready --username=xxxx -p 6544
/tmp:6544 - accepting connections

There is no user xxxx. (PG envvars are removed)

Per the manual page on pg_isready:

The options --dbname and --username can be used to avoid gratuitous
error messages in the logs, but are not necessary for proper
functionality.

The libpq entry on PQpingParams(), which pg_isready uses, has a bit
more details:

It is not necessary to supply correct user name, password, or
database name values to obtain the server status; however, if
incorrect values are provided, the server will log a failed
connection attempt.

BTW, I find the above PQpingParams() explanation much more clear
than one in pg_isready. I think we should use the same text in both
places.

Done.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers