note 87550 added to function.pg-pconnect
| From: | robertb at osu1 dot php dot net | Date: | Wed, 10 Dec 2008 08:54:02 +0000 |
| Subject: | note 87550 added to function.pg-pconnect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-147977@lists.php.net to get a copy of this message | ||
You should not use pg_pconnect - it's broken. It will work but it doesn't really pool, and
it's behaviour is unpredictable. It will only make you rise the max_connections parameter in
postgresql.conf file until you run out of resources (which will slow your database down).
If you have many concurrent connections to your database, you should use the PostgreSQL connection
pooler PgBouncer (developed by the Skype-team). When using pgbouncer, make sure you use pg_connect
and NOT pg_pconnect. Also, make sure you close your connections with pg_close.
* PGBouncer homepage:
http://developer.skype.com/SkypeGarage/DbProjects/PgBouncer
* PostgreSQL pooling article by Last.fm:
http://www.last.fm/user/Russ/journal/2008/02/21
/zd_postgres_connection_pools:_pgpool_vs._pgbouncer
----
Server IP: 212.63.193.10
Probable Submitter: 88.131.54.66
----
Manual Page -- http://www.php.net/manual/en/function.pg-pconnect.php
Edit -- https://master.php.net/note/edit/87550
Del: integrated -- https://master.php.net/note/delete/87550/integrated
Del: useless -- https://master.php.net/note/delete/87550/useless
Del: bad code -- https://master.php.net/note/delete/87550/bad+code
Del: spam -- https://master.php.net/note/delete/87550/spam
Del: non-english -- https://master.php.net/note/delete/87550/non-english
Del: in docs -- https://master.php.net/note/delete/87550/in+docs
Del: other reasons-- https://master.php.net/note/delete/87550
Reject -- https://master.php.net/note/reject/87550
Search -- https://master.php.net/manage/user-notes.php