Re: Checking that Pg is running from a shell script

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vincent Stoessel <vincent(at)xaymaca(dot)com>
Cc: Fran Fabrizio <ffabrizio(at)mmrd(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Checking that Pg is running from a shell script
Date: 2002-06-10 20:51:09
Message-ID: 8657.1023742269@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Vincent Stoessel <vincent(at)xaymaca(dot)com> writes:
> Can pg_ctl across the network?

No.

> I'd like my middleware server to know
> if my postgres db is up and running OK. I guess I could just make a
> db connection but I was hoping for a more elegant solution.

Making a connection is the only way at present. There was some talk of
writing a "pg_ping" utility that would just send a probe packet to the
postmaster (and not, for example, require you to supply a password).
No one's got round to it, but it's just a small matter of programming...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ericson Smith 2002-06-10 21:01:52 Re: Checking that Pg is running from a shell script
Previous Message Tom Lane 2002-06-10 20:48:03 Re: logging to a file