RE: pg_connect vs. pg_pconnect - Mailing list pgsql-php

From Brent R. Matzelle
Subject RE: pg_connect vs. pg_pconnect
Date
Msg-id 20010809134919.9991.qmail@web13008.mail.yahoo.com
Whole thread Raw
In response to RE: pg_connect vs. pg_pconnect  ("Hunter, Ray" <rhunter@enterasys.com>)
List pgsql-php
--- "Hunter, Ray" <rhunter@enterasys.com> wrote:
> Chris,
>
> I am including the php source that has the pg_pconnect and the
> problems.  On
> one php page, I am query the database multilple times to get
> specific data
> in order to populate a table for our engineers.
>
> I have to use it on the create_sub_table function.
>
> I have no idea why it does not work.

I personally never mix connection types as I always use
pg_pconnect() for every connection call.  I consistently get one
PostgreSQL process for each Apache process.

Your code opens up a new PostgreSQL connection for each function
call, except for create_sub_table().  As a result, you can have
many idle database processes for each httpd process.  You can
count on each non-pg_pconnect() connection to linger for a
minute or so and that will eat all your system resources with
only a few simultaneous users.

Brent

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

pgsql-php by date:

Previous
From: "Hunter, Ray"
Date:
Subject: RE: RE: pg_connect vs. pg_pconnect
Next
From: "Hunter, Ray"
Date:
Subject: RE: pg_connect vs. pg_pconnect