PostgreSQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesPostgreSQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 7th, 2002, 12:22 AM
ggnanaraj ggnanaraj is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Chennai, India
Posts: 69 ggnanaraj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 55 sec
Reputation Power: 11
Question Connection Pooling in PostgreSQL

Hi PostgreSQL Guru's

Is connection pooling available in PostgreSQL ? If yes, please give links to resources.

Do give your valuable input.

Best Regards.

Last edited by ggnanaraj : October 7th, 2002 at 12:25 AM.

Reply With Quote
  #2  
Old October 7th, 2002, 07:31 PM
Bob Loblaw Bob Loblaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Posts: 174 Bob Loblaw User rank is Sergeant (500 - 2000 Reputation Level)Bob Loblaw User rank is Sergeant (500 - 2000 Reputation Level)Bob Loblaw User rank is Sergeant (500 - 2000 Reputation Level)Bob Loblaw User rank is Sergeant (500 - 2000 Reputation Level)Bob Loblaw User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 17
__________________


VCR clock programmer and toaster repairman, best rates and best work around

Reply With Quote
  #3  
Old October 7th, 2002, 10:18 PM
Ted Striker Ted Striker is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 409 Ted Striker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
ggnanaraj,

I think Bob is onto something. As far as I know, Postgres DOES NOT handle any connection pooling. That doesn't mean you can't use it. Just means you need something else that does support it, like an application/middle tier server.

So in your case I am assuming that this is handled by the JBoss server you are using. While I'm not familiar with JBoss, I would start there. They tout themselves as having the best java application server out there, so I'm guessing this is a feature that has been around for a long time. If it's in Tomcat as Bob pointed out, surely it's in JBoss.

Last edited by Ted Striker : October 7th, 2002 at 10:24 PM.

Reply With Quote
  #4  
Old October 7th, 2002, 10:28 PM
Ted Striker Ted Striker is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 409 Ted Striker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
JBoss pools JDBC connections using something called Minerva, I'm not sure what this is but that's what I keep reading about.

Reply With Quote
  #5  
Old October 7th, 2002, 10:49 PM
ggnanaraj ggnanaraj is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Chennai, India
Posts: 69 ggnanaraj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 55 sec
Reputation Power: 11
Thumbs up

Thanks for the valuable input. Appreciate it.

Best Regards.

Reply With Quote
  #6  
Old October 9th, 2002, 11:22 PM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Central Florida, USA
Posts: 2,306 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 6 h 42 m 51 sec
Reputation Power: 60
Connection pooling is not a database function but an application environment function. For example, as seen above, any JDBC-enabled database system can have connections pooled by Java.

PHP at present does not have native connection pooling, but there is a third-party project which provides that: www.vl-srm.net. This is essentially a PHP "back end", which keeps variables, objects, connections alive for access from any PHP script.

There is also another open source project called SQL Relay which is a "generic" database connection pooler, which can serve data to many programming environments, including PHP, Perl, and Java.
__________________
The real n-tier system:

FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

Amazon wishlist -- rycamor (at) gmail.com

Reply With Quote
  #7  
Old October 9th, 2002, 11:58 PM
Ted Striker Ted Striker is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 409 Ted Striker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
Question

rycamor,

Do you consider the persistent connections in PHP (pg_pconnect versus pg_connect) to be connection pooling? I use the persistent connections and was always thought this to be a type of connection pooling.

Reply With Quote
  #8  
Old October 10th, 2002, 12:18 AM
rycamor rycamor is offline
Gödelian monster
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jul 1999
Location: Central Florida, USA
Posts: 2,306 rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level)rycamor User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Days 6 h 42 m 51 sec
Reputation Power: 60
Persistent isn't the same thing as shared. With persistent connections, that just means that when a particular script's execution ends, the connection is left open by that httpd process so that it will be available for the next script which this process will serve. So, it is still one connection per script, we just avoid the startup/shutdown costs, to a certain extent.

This is different from connection pooling, where an intermediary process maintains a set of open connections for sharing. For example this pooling agent might pass several SQL queries through one connection, from different request objects, and return the results, each to it's respective owner. This means the pooling agent can properly schedule the available number of open connections, using each one as efficiently as possible.

In the PHP isn't an Enterprise Solution thread, we discussed this, in the last few posts. (rod k had some good perspective on this). One thing to remember is that this does involve the in-memory cost of an open httpd process, so there can be drawbacks, especially if you are also serving a lot of static content from the same httpd daemon. (There might be many useless connections held open for no good reason)

Reply With Quote
  #9  
Old October 10th, 2002, 05:31 PM
Ted Striker Ted Striker is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 409 Ted Striker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
Thanks for the clarification rycamor, that makes alot of sense.

It has started to click now why an app like SRM would make sense.

I know that I use alot of session variables that are passed between pages, and let me tell you, it's a royal pain in the ***. I can't imagine how much degradation all those disk writes are causing either.

Being able to cache sessions in memory would ROCK.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesPostgreSQL Help > Connection Pooling in PostgreSQL

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap