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 3178.975550811@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug? 'psql -l' in pg_ctl?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bug? 'psql -l' in pg_ctl?  (Larry Rosenman <ler@lerctr.org>)
Re: Bug? 'psql -l' in pg_ctl?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
> 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.

I fixed that today; if the database status is not open-for-business,
the postmaster will tell you so right away instead of making you go
through the authentication protocol first.  So a pg_ping could be
written that just sends a connection request packet and sees what
comes back.

However, if we're running in TRUST or IDENT mode, it's possible that
that technique will lead to launching a backend to no purpose.  So
maybe we ought to extend the postmaster protocol to have a "query
status" packet type.  Thoughts?

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unanswered questions about Postgre
Next
From: Larry Rosenman
Date:
Subject: Re: Bug? 'psql -l' in pg_ctl?