pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kris Jurka <books@ejurka.com>
Cc: David Goodenough <david.goodenough@btconnect.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: confused about transactions and connection pools
Date: Mon, 30 Oct 2006 17:25:26 -0500
Message-ID: <20716.1162247126@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.BSO.4.63.0610301337200.2855@leary2.csoft.net>
References: <200610301117.54932.david.goodenough@btconnect.com>
	<Pine.BSO.4.63.0610301337200.2855@leary2.csoft.net>

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



view thread (12+ messages)  latest in thread

Message-ID: <20716.1162247126@sss.pgh.pa.us>
Permalink:  ../20716.1162247126@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20716.1162247126@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, books@ejurka.com, david.goodenough@btconnect.com
  Subject: Re: confused about transactions and connection pools
  In-Reply-To: <20716.1162247126@sss.pgh.pa.us>
  References: <200610301117.54932.david.goodenough@btconnect.com> <Pine.BSO.4.63.0610301337200.2855@leary2.csoft.net> <20716.1162247126@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox