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 097D0329E73 for ; Sun, 19 Sep 2004 10:47:47 +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 73231-03 for ; Sun, 19 Sep 2004 09:47:42 +0000 (GMT) Received: from curry.tmsl.demon.co.uk (tmsl-adsl.demon.co.uk [80.177.114.181]) by svr1.postgresql.org (Postfix) with ESMTP id E293F329D9C for ; Sun, 19 Sep 2004 10:47:42 +0100 (BST) Received: from bacon.tmsl.demon.co.uk (bacon.tmsl.demon.co.uk [192.168.7.102]) by curry.tmsl.demon.co.uk (8.11.6/8.11.6) with ESMTP id i8J9le005478; Sun, 19 Sep 2004 10:47:40 +0100 Date: Sun, 19 Sep 2004 10:47:38 +0100 From: Paul Thomas To: Jeffrey Tenny Cc: "pgsql-jdbc @ postgresql . org" Subject: Re: "Idle in Transaction" revisited. Message-ID: <20040919104738.A15801@bacon> References: <414CAFC9.9090908@comcast.net> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 In-Reply-To: <414CAFC9.9090908@comcast.net>; from jeffrey.tenny@comcast.net on Sat, Sep 18, 2004 at 22:59:37 +0100 X-Mailer: Balsa 1.2.3 Lines: 32 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/117 X-Sequence-Number: 11007 On 18/09/2004 22:59 Jeffrey Tenny wrote: > [snip] > I'm still running against 7.3.x, but if the above two paragraphs > are true that's very problematic for me if I'm going to upgrade. > My app also runs 24/7 and uses serializable transactions in pooled > connections. > > Are you saying that I will see stale database state at the logical > "start" of my transaction from a pooled connection? > > That's a showstopper for sure. If I'm confused please enlighten me. > I've been holding off on upgrading because of the amount activity on this > list about 7.4+ systems. > > This is the first thing that's been sufficiently integrity threatening > that it prompted me to de-lurk. I need data as of when the transaction > starts, not when the database last committed a transaction via that > connection. Our web app deploys on 7.3 and 7.4. There's no problem with the 7.3 db/driver but you could be bitten using the 7.4 driver. My solution is to always setAutoCommit(true) before returning the connection to the pool. HTH -- Paul Thomas +------------------------------+-------------------------------------------+ | Thomas Micro Systems Limited | Software Solutions for Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +------------------------------+-------------------------------------------+