From: Dave Cramer <pg@fastcrypt.com>
To: James Neff <jneff@tethyshealth.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: connection pooling for postgres
Date: Thu, 11 Jan 2007 10:04:08 -0500
Message-ID: <A52E8B31-2CA3-421F-9741-FBF4A5EA504A@fastcrypt.com> (raw)
In-Reply-To: <45A64978.3090305@tethyshealth.com>
References: <45A64978.3090305@tethyshealth.com>
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
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: pg@fastcrypt.com, jneff@tethyshealth.com
Subject: Re: connection pooling for postgres
In-Reply-To: <A52E8B31-2CA3-421F-9741-FBF4A5EA504A@fastcrypt.com>
References: <45A64978.3090305@tethyshealth.com> <A52E8B31-2CA3-421F-9741-FBF4A5EA504A@fastcrypt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox