(PHP 4 >= 4.3.0, PHP 5, PHP 7)

pg_get_pidPing database connection


pg_get_pid ( resource $connection ) : int

pg_get_pid() gets backend (database server process) PID. PID is useful to check if NOTIFY message is sent from other process or not.

See also pg_get_notify()

Example #1 PostgreSQL backend PID

pg_pconnect ("dbname=publisher");
if (!
$conn) {
"An error occured.\n";

// Backend process PID. Use PID with pg_get_notify()
$pid pg_get_pid($conn);

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top