Re: confused about transactions and connection pools - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: confused about transactions and connection pools
Date
Msg-id 20716.1162247126@sss.pgh.pa.us
Whole thread Raw
In response to Re: confused about transactions and connection pools  (Kris Jurka <books@ejurka.com>)
Responses Re: confused about transactions and connection pools
Re: confused about transactions and connection pools
List pgsql-jdbc
Kris Jurka <books@ejurka.com> 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

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Bug extracting bit value
Next
From: Dave Cramer
Date:
Subject: Re: confused about transactions and connection pools