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

From Vincent Stoessel
Subject Re: Checking that Pg is running from a shell script
Date
Msg-id 3D04FF0F.7070302@xaymaca.com
Whole thread Raw
In response to Checking that Pg is running from a shell script  (Fran Fabrizio <ffabrizio@mmrd.com>)
Responses Re: Checking that Pg is running from a shell script  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Checking that Pg is running from a shell script  (Ericson Smith <eric@did-it.com>)
List pgsql-general
Can pg_ctl across the network? 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.
Thanks.

Fran Fabrizio wrote:
> Lamar Owen wrote:
>
>> On Monday 10 June 2002 10:29 am, Fran Fabrizio wrote:
>>
>>
>>> What's the best way to ensure that Pg is running from a shell script?
>>> I'm crafting a few RPMs for my projects, one of which will attempt to
>>> load data into a database, but I want to check that it's running first
>>> before I try this
>>>
>> See the man page for pg_ctl.  There is, IIRC, a status option, but you
>> have to know the location of PGDATA (which, in a vanilla RPM install
>> is /var/lib/pgsql/data).
>>
>>
>
> Thanks all, the pg_ctl -D /var/lib/pgsql/data status should be
> sufficient for my needs.
>
> -Fran
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org



--
Vincent Stoessel
Linux Systems Developer
vincent xaymaca.com


pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: [SQL] VIEWs and FOREIGN keys
Next
From: Andrew Sullivan
Date:
Subject: Re: Help with data transfer please