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

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

Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> writes:
> Probably we really need here is a kind of ping tool for PostgreSQL,
> instead of using psql.

> You could directory invoke postmaster but problem is there is no
> reliable way to detect if PostgreSQL up and running other than
> trying to make an actual communication with backend...

I thought about watching for the postmaster.pid file to appear,
but that happens before the system is really up and running
--- the startup process isn't finished, and could still fail.
(Writing the pidfile later doesn't seem like a good answer to that,
since that'd weaken its main purpose of interlocking against
multiple postmaster startups.)

Trying to connect does seem to be the most reliable way to verify
that the postmaster is open for business.

(BTW, a short-term answer for grasshacker is not to use -w in his
pg_ctl start script ...)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message GH 2000-11-27 03:28:33 Re: Bug? 'psql -l' in pg_ctl?
Previous Message Tom Lane 2000-11-27 03:00:49 Re: Bug? 'psql -l' in pg_ctl?