Re: confused about transactions and connection pools

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kris Jurka <books(at)ejurka(dot)com>, David Goodenough <david(dot)goodenough(at)btconnect(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: confused about transactions and connection pools
Date: 2006-10-30 23:20:48
Message-ID: 44003CDE-70FF-4286-B61F-F0DAACB45DFD@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


On 30-Oct-06, at 5:25 PM, Tom Lane wrote:

> Kris Jurka <books(at)ejurka(dot)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.

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
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Luca Ferrari 2006-10-31 10:18:55 Date time format out of range????
Previous Message Tom Lane 2006-10-30 22:25:26 Re: confused about transactions and connection pools