how to test whether postgres server is running?

From: Reynard Hilman <reynardmh(at)lightsky(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: how to test whether postgres server is running?
Date: 2003-03-27 22:46:50
Message-ID: 3E837F5A.5050401@lightsky.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi everyone,

I run into problem where pg_pconnect (in php script) failed to get
connection to the postgres server even when the server is actually
running because the server is too busy (serving too many requests).

So I want to check from php script if postgres server is running. The
only way I could think of to is telnet the server on port 5432 (where
postgres is listening).

Does someone know a better way to check if postgres server is running?

thanks
- reynard

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Bartley 2003-03-27 22:54:54 Re: About OIDs
Previous Message Tom Lane 2003-03-27 22:25:35 Re: Bug in contrib/intagg int_array_enum() ?