From: | Bill Moran <wmoran(at)potentialtech(dot)com> |
---|---|
To: | Stefan Sturm <mailling(at)anrath(dot)info> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Postgre and Web Request |
Date: | 2004-04-29 13:24:58 |
Message-ID: | 4091022A.3040302@potentialtech.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Stefan Sturm wrote:
> Hello,
>
>>Depending on your web development environment (java, php, .NET) etc,
>>you should be able to use some mechanism that will provide a pool of
>>connections to the database. Each request does not open a new
>>connection (and then release it), but insteads gets a connection from
>>the pool to use, and returns it back to the pool when done.
>
> Where can I find some examples for connection pooling with php? Or must I
> just use persistence connections?
php handles connection pooling more or less automatically ... as long as
you use pg_pconnect() instead of pg_connect().
You have to be careful using connection pooling. For example, if you create
a temporary table and forget to delete it when the the script completes, the
next time the script runs, it's likely that the connection will be reused
and the script will cause an error because the temp table already exists.
Here's some docs at the php web site that may help:
http://us4.php.net/manual/en/features.persistent-connections.php
--
Bill Moran
Potential Technologies
http://www.potentialtech.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2004-04-29 13:30:53 | Re: Postgre and Web Request |
Previous Message | Robert Treat | 2004-04-29 13:08:20 | Re: Postgre and Web Request |