From: | "Adam Lang" <aalang(at)rutgersinsurance(dot)com> |
---|---|
To: | <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: persistent vs. non-persistent |
Date: | 2001-10-04 13:07:45 |
Message-ID: | 00b801c14cd5$8f15cc40$330a0a0a@rutgersinsurance.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
You don't do anything different. For the most part, persistent connections
are a "man behind the curtain" thing. PHP and Apache handle the details of
reusing connections. You just tell it to pgconnect and it does the checking
for you and decides if it needs to build a new connection or not.
I don't like to call it this, but you might understand it better if you
think of "pooling" (even though it really isn't pooling). Each Apache child
will have its own pool of db connections to reuse. From page to page, there
is no guarantee you will get the same connection.
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
----- Original Message -----
From: "Chris Ruprecht" <chrup999(at)yahoo(dot)com>
To: <pgsql-php(at)postgresql(dot)org>
Sent: Tuesday, October 02, 2001 11:02 AM
Subject: Re: [PHP] persistent vs. non-persistent
> Brent,
>
> given, that you keep the connection open indefinitely, how do you use it?
>
> Do I go and $db = pg_pconnect(...); when I first start apache and then
never
> do a connect again, unless I re-start apache? How would I query if a
> connection already exists?
>
> Best regards,
> Chris
From | Date | Subject | |
---|---|---|---|
Next Message | Heather Johnson | 2001-10-04 14:17:28 | Re: Need Help!! |
Previous Message | Adam Lang | 2001-10-04 13:03:42 | Re: persistent vs. non-persistent |