Re: persistent vs. non-persistent - Mailing list pgsql-php

From Adam Lang
Subject Re: persistent vs. non-persistent
Date
Msg-id 00b801c14cd5$8f15cc40$330a0a0a@rutgersinsurance.com
Whole thread Raw
In response to Re: persistent vs. non-persistent  ("Brent R. Matzelle" <bmatzelle@yahoo.com>)
List 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@yahoo.com>
To: <pgsql-php@postgresql.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





pgsql-php by date:

Previous
From: "Adam Lang"
Date:
Subject: Re: persistent vs. non-persistent
Next
From: Gurudutt
Date:
Subject: Need Help!!