Skip site navigation (1) Skip section navigation (2)

RE: pg_connect vs. pg_pconnect

From: "Brent R(dot) Matzelle" <bmatzelle(at)yahoo(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: RE: pg_connect vs. pg_pconnect
Date: 2001-08-09 13:49:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-php
--- "Hunter, Ray" <rhunter(at)enterasys(dot)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.   


Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger

In response to

pgsql-php by date

Next:From: Leonello, Chris (C.R.)Date: 2001-08-10 17:45:23
Subject: RE: pg_connect vs. pg_pconnect
Previous:From: Hunter, RayDate: 2001-08-09 13:40:56
Subject: RE: RE: pg_connect vs. pg_pconnect

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group