Checking that Pg is running from a shell script

From: Fran Fabrizio <ffabrizio(at)mmrd(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Checking that Pg is running from a shell script
Date: 2002-06-10 14:29:06
Message-ID: 3D04B7B2.80701@mmrd.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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.

I'm a shell scripting newbie so apologies if the answer is really
straightforward. I don't know if UNIX processes leave a standard trail
so that I could just look up if something is listening on 5432, for
example.

Thanks,
Fran

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Snyder 2002-06-10 14:49:40 Re: Slow connection
Previous Message Doug Fields 2002-06-10 14:09:40 Re: Non-linear Performance