pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gaetano Mendola <mendola@bigfoot.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: John R Pierce <pierce@hogranch.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: "Idle in Transaction" revisited.
Date: Sat, 18 Sep 2004 15:50:34 +0200
Message-ID: <414C3D2A.4060002@bigfoot.com> (raw)
In-Reply-To: <414C13A6.8080407@opencloud.com>
References: <0dfb01c49d0e$5c61c1f0$0200a8c0@hogranch.com>
	<414C0F66.7090507@bigfoot.com>
	<414C13A6.8080407@opencloud.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Oliver Jowett wrote:
| Gaetano Mendola wrote:
|
|> John R Pierce wrote:
|>
|>> I'm curious what common practice is for threads that do nothing but
|>> SELECTS... do folks just enable auto_commit, thereby preventing
|>> pgJDBC from doing BEGIN; ?  Do they lace their code with COMMIT() calls?
|>
|>
|>
|> We were bitten by this problem too, and my solution was to suggest our
|> developer to do and explicit: "ABORT" after the connection, and do
|> explicit "BEGIN"   "END"  instead of rely on the jdbc interface.
|
|
| This is a pretty bad idea as it can confuse the driver's idea of the
| current transaction state. For example, cursor-based resultsets won't
| ever be used if you do your own transaction demarcation in this way.

Fortunatelly I do not use cursors otherwise I could find it out long time ago,
this was the only solution since the 6.x version, and is working well at
least in my applications.
BTW also the python drivers were ( are ? ) affected by this "idle in transaction"
phenomenon and the jdbc 7.4 series too.


Regards
Gaetano Mendola





-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBTD0p7UpzwH2SGd4RAr1nAKCmtDjy8TWAMP/vhC+Kcn+7/XZEOgCgvLN4
YEWFotidXi46eF2rfOpywWc=
=XFRs
-----END PGP SIGNATURE-----




view thread (28+ messages)  latest in thread

Message-ID: <414C3D2A.4060002@bigfoot.com>
Permalink:  ../414C3D2A.4060002@bigfoot.com/
Also on:    postgresql.org/message-id/414C3D2A.4060002@bigfoot.com

 · 

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: mendola@bigfoot.com, oliver@opencloud.com, pierce@hogranch.com
  Subject: Re: "Idle in Transaction" revisited.
  In-Reply-To: <414C3D2A.4060002@bigfoot.com>
  References: <0dfb01c49d0e$5c61c1f0$0200a8c0@hogranch.com> <414C0F66.7090507@bigfoot.com> <414C13A6.8080407@opencloud.com> <414C3D2A.4060002@bigfoot.com>

* 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