Re: Checking that Pg is running from a shell script - Mailing list pgsql-general

From Tom Lane
Subject Re: Checking that Pg is running from a shell script
Date
Msg-id 8657.1023742269@sss.pgh.pa.us
Whole thread Raw
In response to Re: Checking that Pg is running from a shell script  (Vincent Stoessel <vincent@xaymaca.com>)
List pgsql-general
Vincent Stoessel <vincent@xaymaca.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

pgsql-general by date:

Previous
From: Neil Conway
Date:
Subject: Re: logging to a file
Next
From: Jim Caley
Date:
Subject: Re: logging to a file