Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C210A9FB1E6 for ; Mon, 30 Oct 2006 19:21:00 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 18071-10 for ; Mon, 30 Oct 2006 19:20:54 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 38D939FB263 for ; Mon, 30 Oct 2006 19:20:54 -0400 (AST) Received: (qmail 21882 invoked from network); 30 Oct 2006 23:20:53 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 30 Oct 2006 23:20:53 -0000 In-Reply-To: <20716.1162247126@sss.pgh.pa.us> References: <200610301117.54932.david.goodenough@btconnect.com> <20716.1162247126@sss.pgh.pa.us> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <44003CDE-70FF-4286-B61F-F0DAACB45DFD@fastcrypt.com> Cc: Kris Jurka , David Goodenough , pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: confused about transactions and connection pools Date: Mon, 30 Oct 2006 18:20:48 -0500 To: Tom Lane X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/147 X-Sequence-Number: 16030 On 30-Oct-06, at 5:25 PM, Tom Lane wrote: > Kris Jurka writes: >> For each connection the statements BEGIN, ROLLBACK, and COMMIT are >> only >> prepared once and after that they are executed again and again. >> This can >> be very confusing when looking at the logs which only show the >> preparation >> step, but not execution. So even though you can't see them, >> they're being >> executed. The 8.2 release will be the first release that can >> accurately >> log this usage pattern. > > BTW, have you verified that it's actually worth the trouble to prepare > these commands? Given that there's no planning cost for a utility > statement, and hardly any parsing cost for one-word commands, I'm a > bit > dubious that the prepared-statement machinery actually results in a > win > compared to just issuing simple Query messages. Yeah, the driver needs to be taught to not prepare *everything* in v3 mode Dave > > regards, tom lane > > ---------------------------(end of > broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org >