(PHP 4 >= 4.2.0)
pg_connection_status() retorna o status da conexão Status possíveis são PGSQL_CONNECTION_OK e PGSQL_CONNECTION_BAD.
Veja também pg_connection_busy().