Re: Connection Pooling

From: Allan Kamau <kamauallan(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Connection Pooling
Date: 2010-03-27 06:34:03
Message-ID: ab1ea6541003262334i519fc378m92fd654a1699a9a0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Mar 26, 2010 at 11:17 PM, David Kerr <dmk(at)mr-paradox(dot)net> wrote:
> Howdy all,
>
> I have some apps that are connecting to my DB via direct JDBC and I'd like to pool their connections.
>
> I've been looking at poolers for a while, and pgbouncer and pgpool-ii seem to be some of the most popular, so
> i've started with those.
>
>
> I'm setting up pgbouncer, and i've hit a bit of a snag. Hopefully someone can tell me if pgbouncer or pgpool are
> capable of this (and if so, how to do it) or alternatly a pooler that can...
>
> What I'd like to be able to do is this (not using pooler syntax, this is just a high level of what i want to achive)
>
> Say i set max pool size = 10 connections. and max # of pools = 5.
>
> That means that i should have 5 connections to my database covering 50 connections total.
>
> I can't really seem to make that work with pgbouncer without naming the pools separetly. (pool1 = dbname = a, pool2 = dbname =a)
> which means my app is tied to a pool (or has to specifically code to rotate pools...) which is not really desireable.
>
> is what i'm looking to do possible in pgbouncer or pgpool? or anything?
>
> Thanks
>
> Dave
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

You may also have a look at Commons DBCP from Apache software
foundation, "http://commons.apache.org/dbcp/". I have used it for a
few projects and have had no problems.

Allan.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2010-03-27 07:46:05 Re: Connection Pooling
Previous Message Frans Hals 2010-03-26 23:43:04 Re: Large index operation crashes postgres