how to test whether postgres server is running? - Mailing list pgsql-general

From Reynard Hilman
Subject how to test whether postgres server is running?
Date
Msg-id 3E837F5A.5050401@lightsky.com
Whole thread Raw
In response to Re: Bug in contrib/intagg int_array_enum() ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: how to test whether postgres server is running?  (Darren Ferguson <darren@thread.crystalballinc.com>)
List 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


pgsql-general by date:

Previous
From: "Andrew Bartley"
Date:
Subject: Re: About OIDs
Next
From: Greg Stark
Date:
Subject: Re: Bug in contrib/intagg int_array_enum() ?