pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Sullivan <ajs@crankycanuck.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to check postgres running or not ?
Date: Mon, 20 Sep 2004 08:19:27 -0400 (EDT)
Message-ID: <200409201219.i8KCJRp05291@candle.pha.pa.us> (raw)
In-Reply-To: <19876.1095613927@sss.pgh.pa.us>

Tom Lane wrote:
> At one time there was discussion of writing a "pg_ping" utility program
> to do exactly this, but it still hasn't got done.  You can fake it to
> some extent by just running "psql -l >/dev/null" and checking the exit
> code, but this does require supplying a valid username and possibly a
> password (because psql's exit code doesn't distinguish "could not
> connect" from authentication errors).
> 
> BTW, "pg_ctl status" doesn't answer this need because it only looks for
> a postmaster.pid file, it doesn't attempt to verify that the postmaster
> is really alive.

Is improving this a TODO item for pg_ctl?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



view thread (22+ messages)  latest in thread

Message-ID: <200409201219.i8KCJRp05291@candle.pha.pa.us>
Permalink:  ../200409201219.i8KCJRp05291@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200409201219.i8KCJRp05291@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, ajs@crankycanuck.ca
  Subject: Re: How to check postgres running or not ?
  In-Reply-To: <200409201219.i8KCJRp05291@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox