Re: Bug? 'psql -l' in pg_ctl? - Mailing list pgsql-general

From Tom Lane
Subject Re: Bug? 'psql -l' in pg_ctl?
Date
Msg-id 26668.975479660@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug? 'psql -l' in pg_ctl?  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: Bug? 'psql -l' in pg_ctl?
Re: Bug? 'psql -l' in pg_ctl?
List pgsql-general
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
>> Trying to connect does seem to be the most reliable way to verify
>> that the postmaster is open for business.

> Agreed.

> Do you think it's a good idea to invent a new command such as
> "pg_ping" or should we add a new option to psql instead?

I'd lean towards a pg_ping (Peter E., any comment here?)

Really we'd need to change the postmaster too, because what we need to
do is send a query "are you ready to accept connections?" that the
postmaster will answer without an authentication exchange.  AFAIR this
is *not* immediately evident from the postmaster's current behavior ---
I think it will challenge you for a password even before the startup
subprocess is done.

Or we could invent a status file in $PGDATA that's separate from the
pid interlock file, and have pg_ctl look for that.  But I think a
communication protocol might be cleaner.

            regards, tom lane

pgsql-general by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Bug? 'psql -l' in pg_ctl?
Next
From: Jeff Davis
Date:
Subject: Postgres and fs quotas