From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Determine if a user and database are available
Date: Fri, 02 Sep 2022 20:55:24 -0400
Message-ID: <1255447.1662166524@sss.pgh.pa.us> (raw)
In-Reply-To: <3698b162-8146-cc59-0da4-390d2c6f8189@gmail.com>
References: <CAH8yC8=fbU-DWSNso7qKDSNCj52hTop8ENKxF7_4a=hjY-nn6w@mail.gmail.com>
<1229132.1662157263@sss.pgh.pa.us>
<3698b162-8146-cc59-0da4-390d2c6f8189@gmail.com>
Ron <ronljohnsonjr@gmail.com> writes:
> On 9/2/22 17:21, Tom Lane wrote:
>> That's a feature actually. The intended use of pg_isready is to
>> find out if the server is alive, not whether any particular user
>> or database name is correct.
> Then what's the point of the --username=USERNAME connection option?
That's explained in the documentation extract already quoted:
if you do use a bad user/db/password, the server will log a message
about that, since it just sees a failed connection attempt. If you'd
rather not have such chatter in your log, then you want to give
pg_isready valid connection data. But that's incidental to the
purpose of the program.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, ronljohnsonjr@gmail.com
Subject: Re: Determine if a user and database are available
In-Reply-To: <1255447.1662166524@sss.pgh.pa.us>
References: <CAH8yC8=fbU-DWSNso7qKDSNCj52hTop8ENKxF7_4a=hjY-nn6w@mail.gmail.com> <1229132.1662157263@sss.pgh.pa.us> <3698b162-8146-cc59-0da4-390d2c6f8189@gmail.com> <1255447.1662166524@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox