Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 6C8EC9FA59C for ; Thu, 11 Jan 2007 11:11:14 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 80394-06 for ; Thu, 11 Jan 2007 11:10:56 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mir3-fs.mir3.com (mail.mir3.com [65.208.188.100]) by postgresql.org (Postfix) with ESMTP id 4D3249FA4DD for ; Thu, 11 Jan 2007 11:11:00 -0400 (AST) Received: mir3-fs.mir3.com 172.16.1.11 from 172.16.2.68 172.16.2.68 via HTTP with MS-WebStorage 6.0.6249 Received: from archimedes.mirlogic.com by mir3-fs.mir3.com; 11 Jan 2007 07:10:48 -0800 Subject: Re: connection pooling for postgres From: Mark Lewis To: Dave Cramer Cc: James Neff , pgsql-jdbc@postgresql.org In-Reply-To: References: <45A64978.3090305@tethyshealth.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: MIR3, Inc. Date: Thu, 11 Jan 2007 07:10:48 -0800 Message-Id: <1168528248.7947.441.camel@archimedes> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-27.rhel4.6) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/78 X-Sequence-Number: 16443 Dave, Is DBCP in good shape these days? We were disappointed with its stability a few years back, although I guess there's been plenty of time since then for things to improve . . . -- Mark Lewis On Thu, 2007-01-11 at 10:04 -0500, Dave Cramer wrote: > James, > > The internal pooling implementation that the driver provides is not > really production quality. > > It's recommended you look at apache's dbcp. > > Dave > On 11-Jan-07, at 9:28 AM, James Neff wrote: > > > Greetings, > > > > Sorry for the elementary question but I am still relatively new to > > Java and JDBC. > > > > I have 4 clients running on different servers that connect to a > > Postgres database, pull down some data, process this data and then > > insert it back to the database into different tables. > > > > Because several of the client servers are running on multiple CPUs, > > or at least dual core, systems there are actually 10 threads on > > each client that are doing the processing. This means 10 > > connections per server. I think this is causing some resource > > problems and would like to see how things run if I set up a > > connection pool for each client, of say 3 connections, and the > > processing threads would then use one of those 3 when it becomes > > available. > > > > Where can I find good instructions or a tutorial on how to do > > connection pooling for JDBC to a Postgres database on my client? > > > > Is there a better way for me to approach this? > > > > Thanks in advance, > > James > > > > ---------------------------(end of > > broadcast)--------------------------- > > TIP 3: Have you checked our extensive FAQ? > > > > http://www.postgresql.org/docs/faq > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend