From: Adam Lang <aalang@rutgersinsurance.com>
To: pgsql-php@postgresql.org
Subject: Re: persistent vs. non-persistent
Date: Thu, 4 Oct 2001 09:07:45 -0400
Message-ID: <00b801c14cd5$8f15cc40$330a0a0a@rutgersinsurance.com> (raw)
References: <20011002142522.75914.qmail@web13006.mail.yahoo.com>
<008601c14b53$4c1507e0$5dd26383@corp.compucom.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: aalang@rutgersinsurance.com
Subject: Re: persistent vs. non-persistent
In-Reply-To: <00b801c14cd5$8f15cc40$330a0a0a@rutgersinsurance.com>
References: <20011002142522.75914.qmail@web13006.mail.yahoo.com> <008601c14b53$4c1507e0$5dd26383@corp.compucom.com> <00b801c14cd5$8f15cc40$330a0a0a@rutgersinsurance.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox