Skip site navigation (1) Skip section navigation (2)

Re: How to check postgres running or not ?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>, pgsql-sql(at)postgresql(dot)org
Subject: Re: How to check postgres running or not ?
Date: 2004-09-20 12:19:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
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 file, it doesn't attempt to verify that the postmaster
> is really alive.

Is improving this a TODO item for pg_ctl?

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

In response to

pgsql-sql by date

Next:From: Bruce MomjianDate: 2004-09-20 12:34:27
Subject: Re: Implicit Transactions
Previous:From: Peter EisentrautDate: 2004-09-20 11:47:44
Subject: Re: How to check postgres running or not ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group