Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 2242E9F9757 for ; Sun, 30 Sep 2007 17:51:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 97177-07 for ; Sun, 30 Sep 2007 17:50:50 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by postgresql.org (Postfix) with ESMTP id A78449F9726 for ; Sun, 30 Sep 2007 17:50:58 -0300 (ADT) Received: from 222-154-155-16.jetstream.xtra.co.nz ([222.154.155.16] helo=[10.1.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Ic5ka-0007i3-I1; Mon, 01 Oct 2007 09:50:52 +1300 Message-ID: <47000C2E.8030409@opencloud.com> Date: Mon, 01 Oct 2007 09:50:54 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Josh Berkus CC: 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> In-Reply-To: <46FFC314.5080205@agliodbs.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/150 X-Sequence-Number: 17572 Josh Berkus wrote: > Oliver, > >> S_1 from client 1 might be a completely different query to S_1 from >> client 2. The JDBC driver just numbers statements sequentially as they >> are used. > > So, how does j2EE-side connection pooling handle this? Err.. it is dealing with JDBC connections, not protocol level stuff, so there's no issue with statement naming. The driver just does what it normally does (maintains a mapping of query to statement name on each connection). The usual J2EE connection pool model is different to what pgbouncer apparently does as clients explicitly return connections to the pool when no longer needed -- which effectively invalidates any PreparedStatement objects they might still be holding -- and reobtain them when later need. -O