bool pg_ping ([ resource $connection ] )
pg_ping() pings a database connection and tries to reconnect it if it is broken.
Returns TRUE on success or FALSE on failure.