X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6D9FD329E64 for ; Sat, 18 Sep 2004 14:51:22 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 20512-10 for ; Sat, 18 Sep 2004 13:51:12 +0000 (GMT) Received: from pns.mm.eutelsat.org (pns.mm.eutelsat.org [194.214.173.227]) by svr1.postgresql.org (Postfix) with ESMTP id CD363329E3D for ; Sat, 18 Sep 2004 14:51:14 +0100 (BST) Received: from nts-03.mm.eutelsat.org (localhost [127.0.0.1]) by pns.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id i8IDnI302677; Sat, 18 Sep 2004 15:49:20 +0200 Received: from [127.0.0.1] (accesspoint.mm.eutelsat.org [194.214.173.4]) by nts-03.mm.eutelsat.org (8.11.6/linuxconf) with ESMTP id i8IDobV00429; Sat, 18 Sep 2004 15:50:37 +0200 Message-ID: <414C3D2A.4060002@bigfoot.com> Date: Sat, 18 Sep 2004 15:50:34 +0200 From: Gaetano Mendola User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Oliver Jowett Cc: John R Pierce , pgsql-jdbc@postgresql.org Subject: Re: "Idle in Transaction" revisited. References: <0dfb01c49d0e$5c61c1f0$0200a8c0@hogranch.com> <414C0F66.7090507@bigfoot.com> <414C13A6.8080407@opencloud.com> In-Reply-To: <414C13A6.8080407@opencloud.com> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/96 X-Sequence-Number: 10986 -----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-----