Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id EEEC09FB1FB for ; Thu, 11 Jan 2007 11:04:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 36782-10 for ; Thu, 11 Jan 2007 11:03:43 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id E24FF9FB22E for ; Thu, 11 Jan 2007 11:04:00 -0400 (AST) Received: (qmail 28511 invoked from network); 11 Jan 2007 15:04:00 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.14?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 11 Jan 2007 15:04:00 -0000 In-Reply-To: <45A64978.3090305@tethyshealth.com> References: <45A64978.3090305@tethyshealth.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: connection pooling for postgres Date: Thu, 11 Jan 2007 10:04:08 -0500 To: James Neff X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/77 X-Sequence-Number: 16442 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 >