Re: Determine if a user and database are available - Mailing list pgsql-general

From Tom Lane
Subject Re: Determine if a user and database are available
Date
Msg-id 1255447.1662166524@sss.pgh.pa.us
Whole thread Raw
In response to Re: Determine if a user and database are available  (Ron <ronljohnsonjr@gmail.com>)
List pgsql-general
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



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Determine if a user and database are available
Next
From: BeginnerC
Date:
Subject: [Beginner Querstion]Where can I find the news of database?