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

RE: pg_connect vs. pg_pconnect

From: "Hunter, Ray" <rhunter(at)enterasys(dot)com>
To: "'Chris Ruprecht'" <chrup999(at)yahoo(dot)com>
Cc: "Pgsql-php (E-mail)" <pgsql-php(at)postgresql(dot)org>
Subject: RE: pg_connect vs. pg_pconnect
Date: 2001-08-09 13:30:47
Message-ID: 59358A738F45D51186A30008C74CE2500A0846@slc-exc1.ctron.com (view raw or flat)
Thread:
Lists: pgsql-php
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. 




RAY HUNTER
Automated Test Group
Software Support Engineer

ENTERASYS NETWORKS

Internal:    53888
Phone:       801 887-9888
Fax:         801 972-5789
Cellular:    801 698-0622

rhunter(at)enterasys(dot)com

www.enterasys.com

-----Original Message-----
From: Chris Ruprecht [mailto:chrup999(at)yahoo(dot)com]
Sent: Thursday, August 09, 2001 7:21 AM
To: Hunter, Ray
Subject: Re: [PHP] pg_connect vs. pg_pconnect


Hi Ray,
 
I don't know why pg_connect wouldn't work for you. It works in every
procedure I have ever written (not all that many and not very complicated
ones). I'm not much help when it comes to fixing the C sources, Tom Lane or
Bruce Momijan are the people to talk to here. 
Can you send me an example of one of the pg_connects which doesn't work?
What is the error message you're getting?
 
Best regards,
Chris
 

----- Original Message ----- 
From: Hunter,  <mailto:rhunter(at)enterasys(dot)com> Ray 
To: 'Chris Ruprecht' <mailto:chrup999(at)yahoo(dot)com>  
Cc: Pgsql-php (E-mail) <mailto:pgsql-php(at)postgresql(dot)org>  
Sent: Thursday, August 09, 2001 8:02 AM
Subject: RE: [PHP] pg_connect vs. pg_pconnect

Chris,
 
I am currently doing testing right now and finding that this is the case.  I
think that there is some kind of bug.  I have to go in and manually kill the
sleeping processes that are remaining after the pg_pconnect calls.  
 
Another question for you is why does pg_pconnect work when pg_connect does
not.  I am running into this problem as I change some of the connections to
pg_connect from pg_pconnect?
 

Thanks,


RAY HUNTER
Automated Test Group
Software Support Engineer

ENTERASYS NETWORKS

rhunter(at)enterasys(dot)com

www.enterasys.com <http://www.enterasys.com> 


 

-----Original Message-----
From: Chris Ruprecht [mailto:chrup999(at)yahoo(dot)com]
Sent: Thursday, August 09, 2001 6:52 AM
To: Hunter, Ray
Subject: Re: [PHP] pg_connect vs. pg_pconnect


Ray,
 
I had the same problem (PG 7.1.2 on RedHat 7.0) and changed the procedures
to only use pg_connect. The is probably a bug in the pg_pconnect ...
pg_close functions.
 
Best regards,
Chris
 

----- Original Message ----- 
From: Hunter,  <mailto:rhunter(at)enterasys(dot)com> Ray 
To: Pgsql-php (E-mail) <mailto:pgsql-php(at)postgresql(dot)org>  
Sent: Thursday, August 09, 2001 7:42 AM
Subject: RE: [PHP] pg_connect vs. pg_pconnect


I am using both.  When I use pg_pconnect it seems that the connections are
still sleeping even after I close the connection ( pg_close( $conn ) ). 


  
  
  
RAY HUNTER 
Automated Test Group 
Software Support Engineer 
  
ENTERASYS NETWORKS 
  
Internal:    53888 
Phone:       801 887-9888 
Fax:         801 972-5789 
Cellular:    801 698-0622 

rhunter(at)enterasys(dot)com 
  
www.enterasys.com 


-----Original Message----- 
From: Mitch Vincent [ mailto:mvincent(at)cablespeed(dot)com
<mailto:mvincent(at)cablespeed(dot)com> ] 
Sent: Wednesday, August 08, 2001 6:10 PM 
To: Hunter, Ray; pgsql-php(at)postgresql(dot)org 
Subject: Re: [PHP] pg_connect vs. pg_pconnect 


If you're using pg_connect they should be terminating... Are you using 
pg_connect or pg_pconnect? 

-Mitch 
Software development : 
You can have it cheap, fast or working. Choose two. 

----- Original Message ----- 
From: "Hunter, Ray" <rhunter(at)enterasys(dot)com> 
To: <pgsql-php(at)postgresql(dot)org> 
Sent: Wednesday, August 08, 2001 7:40 PM 
Subject: [PHP] pg_connect vs. pg_pconnect 


> I understand the difference between the two functions.  However, when I 
> watch my process under process management I notice that I have tons of 
> sleeping process that are lingering.  How can I make it so that when I 
> connect to postgres and query that the connect process is then terminated?

> These sleeping connections are eating up my resources. 
> 
> 
> Any suggestions? 
> 
> 
> 
> RAY HUNTER 
> Automated Test Group 
> Software Support Engineer 
> 
> ENTERASYS NETWORKS 
> 
> Internal:    53888 
> Phone:       801 887-9888 
> Fax:         801 972-5789 
> Cellular:    801 698-0622 
> 
> rhunter(at)enterasys(dot)com 
> 
> www.enterasys.com 
> 


Attachment: dbConnect.class
Description: application/octet-stream (9.0 KB)

Responses

pgsql-php by date

Next:From: Brent R. MatzelleDate: 2001-08-09 13:35:42
Subject: RE: pg_connect vs. pg_pconnect
Previous:From: Hunter, RayDate: 2001-08-09 13:02:06
Subject: RE: pg_connect vs. pg_pconnect

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