Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id A84579FA136 for ; Mon, 30 Oct 2006 18:25:48 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 74445-10 for ; Mon, 30 Oct 2006 22:25:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 95F939F946A for ; Mon, 30 Oct 2006 18:25:45 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k9UMPQSD020717; Mon, 30 Oct 2006 17:25:27 -0500 (EST) To: Kris Jurka cc: David Goodenough , pgsql-jdbc@postgresql.org Subject: Re: confused about transactions and connection pools In-reply-to: References: <200610301117.54932.david.goodenough@btconnect.com> Comments: In-reply-to Kris Jurka message dated "Mon, 30 Oct 2006 13:40:14 -0500" Date: Mon, 30 Oct 2006 17:25:26 -0500 Message-ID: <20716.1162247126@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/146 X-Sequence-Number: 16029 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. regards, tom lane