Re: Checking that Pg is running from a shell script

From: Fran Fabrizio <ffabrizio(at)mmrd(dot)com>
To: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Checking that Pg is running from a shell script
Date: 2002-06-10 18:07:20
Message-ID: 3D04EAD8.7030308@mmrd.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message tony 2002-06-10 18:40:36 Re: Help with data transfer please
Previous Message Lamar Owen 2002-06-10 17:57:20 Re: Checking that Pg is running from a shell script