Re: Bug? 'psql -l' in pg_ctl?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, grasshacker(at)over-yonder(dot)net, pgsql-general(at)postgresql(dot)org
Subject: Re: Bug? 'psql -l' in pg_ctl?
Date: 2000-11-29 20:59:06
Message-ID: 7498.975531546@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
>> 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.

> ISTM that the rejection of a client with authentication failure is a
> pretty good indicator that you're accepting connections.

Well, no, it means that the postmaster is alive. It doesn't mean the
database is open for business yet --- the startup subprocess might still
be running.

I've just tweaked the postmaster so that startup/shutdown state is
checked immediately upon receiving the startup-request packet, and if
there's a database-state reason for rejecting the connection, that
will happen before going through the authentication protocol. This
should make it easier to write a pg_ping.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alex Howansky 2000-11-29 21:08:37 how to determine what a process is doing
Previous Message Manish Vig 2000-11-29 20:39:38 Sysdate counterpart in postgres