Entry
How to use persistent connections
Jun 4th, 2002 09:22
Rick Ellis, John Herrington, José Antonio González Prieto, http://www.php.net/manual/features.persistent-connections.php http://www.php.net/manual/function.pg-pconnect.php
using persistent connections is really easy, just use pg_pconnect
instead of pg_connect and don't try to close the connection. The first
link gives more informantion on what persistent connections are in PHP
(can help you determine if you want to use persistent connections), and
the other one is the pg_pconnect manual page.
N.B. There are some potential problems with transactions and locks.
Neither will be closed if the script doesn't close them. This can lead
to the need to restart either postgres of the web server to clear them.
So if you use persistent connections be sure to close all transactions,
release all locks, and free results.