Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id E69FA9FA1AC for ; Mon, 1 Oct 2007 15:20:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 45904-01 for ; Mon, 1 Oct 2007 15:19:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from outmail129167.authsmtp.com (outmail129167.authsmtp.com [62.13.129.167]) by postgresql.org (Postfix) with ESMTP id 9D2FF9FA1DB for ; Mon, 1 Oct 2007 15:20:10 -0300 (ADT) Received: from outmail128179.authsmtp.co.uk (outmail128179.authsmtp.co.uk [62.13.128.179]) by punt3.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id l91IJ6pu055926; Mon, 1 Oct 2007 19:19:06 +0100 (BST) Received: from josh-berkus-computer-2.local (adsl-63-195-55-98.dsl.snfc21.pacbell.net [63.195.55.98]) (authenticated bits=0) by mail.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id l91IIw1f007360; Mon, 1 Oct 2007 19:18:59 +0100 (BST) Message-ID: <47013A0E.6080607@agliodbs.com> Date: Mon, 01 Oct 2007 11:18:54 -0700 From: Josh Berkus User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Heikki Linnakangas CC: lindner@inuus.com, Oliver Jowett , pgsql-jdbc@postgresql.org Subject: Re: Prepared Statements vs. pgbouncer References: <20070929002513.GG3140@inuus.com> <46FDA4F2.8080507@opencloud.com> <20070929021522.GH3140@inuus.com> <24584.1191033096@sss.pgh.pa.us> <20070929072159.GI3140@inuus.com> <46FE3B1A.7020603@agliodbs.com> <46FED7FA.6060309@opencloud.com> <46FFC314.5080205@agliodbs.com> <47000C2E.8030409@opencloud.com> <4700B21C.1000008@enterprisedb.com> In-Reply-To: <4700B21C.1000008@enterprisedb.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Server-Quench: c8d36fd6-704a-11dc-b86a-001185d377ca X-AuthRoute: OCdyZgscClZXSx8a IioLCC5HRQ8+YBZL BAkGMA9GIUINWEQN c1ACdx10O0FbHwkB BHYKUl5VWVdxWC1z aBRQZABDZ09QVg11 Uk1LR01SWllhAGV4 QR9IUhl1dANGNn95 ZEUsDXgPX0IsIUBg RU5QRHAHZDMzdTIX VhFFdwNVcQtPKhxC bQMuGhFYa3VsHA4S NDp7Byo8JTxFJSgd eR0EMV8XTEAXBXYi XFZKBTolGlADTCgp RyAn X-Authentic-SMTP: 61633136333939.squirrel.dmpriest.net.uk:752/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/14 X-Sequence-Number: 17586 Heikki, > You might also consider if using pgbouncer or similar really is > necessary. Perhaps you could get away with a per-client connection pool, > with "min pool size" small enough, maybe 0, that the number of > simultaneous connections to the server would stay reasonable. > It becomes necessary whenever you have a large number of appservers connecting to the same database server. Setting min pool size downwards isn't really effective becuase then you're just adding connection time delays ... exactly what you're trying to prevent by using a connection pool. I'm working on a scalable project myself which is why I'm concerned about this. The reason why we're planning to rely on pgBouncer is that we'll have both java and non-java applications connecting to the same database, and we don't want to manage two different connection/failover pools. So it's important to us that PG-JDBC function with independant connection pools. So where is it going to be easier to fix this ... pgBouncer, or pg-JDBC? --Josh Berkus