Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id CBB4F64FCDC for ; Wed, 16 Jul 2008 05:48:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 63398-07 for ; Wed, 16 Jul 2008 05:48:10 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mailgw-out.nic.in (mailgw-out.nic.in [164.100.10.14]) by postgresql.org (Postfix) with ESMTP id 1E42F64FCE0 for ; Wed, 16 Jul 2008 05:48:10 -0300 (ADT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtoAAGNSfUjAqAFF/2dsb2JhbAAIsDY X-IronPort-AV: E=McAfee;i="5200,2160,5339"; a="15879878" X-IronPort-AV: E=Sophos;i="4.30,372,1212345000"; d="scan'208";a="15879878" Received: from unknown (HELO mail.nic.in) ([192.168.1.69]) by int.nic.in with ESMTP; 16 Jul 2008 14:16:49 +0530 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-disposition: inline Content-type: text/plain; charset=us-ascii Received: from msgfe1.nic.in ([127.0.0.1]) by msgfe1.nic.in (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTP id <0K4300I10BUE2450@msgfe1.nic.in> for pgsql-jdbc@postgresql.org; Wed, 16 Jul 2008 14:05:02 +0530 (IST) Received: from nic.in ([10.1.150.18]) by msgfe1.nic.in (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTPA id <0K4300EJYBUETMM0@msgfe1.nic.in> for pgsql-jdbc@postgresql.org; Wed, 16 Jul 2008 14:05:02 +0530 (IST) Received: from [10.1.150.18] (Forwarded-For: 164.100.28.150) by msgfe2.nic.in (mshttpd); Wed, 16 Jul 2008 13:35:02 +0500 From: nalini To: Guillaume Cottenceau Cc: pgsql-jdbc@postgresql.org Message-id: <15097d3e119e9f23.487df906@nic.in> Date: Wed, 16 Jul 2008 13:35:02 +0500 X-Mailer: Sun Java(tm) System Messenger Express 6.3-4.01 (built Aug 3 2007; 32bit) Content-language: en Subject: Re: Transaction handling through java X-Accept-Language: en In-reply-to: <87bq0yw943.fsf@mnc.ch> References: <5b2b89135586bc69.487de7d7@nic.in> <87bq0yw943.fsf@mnc.ch> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.191 tagged_above=0 required=5 tests=AWL=0.191 X-Spam-Level: X-Archive-Number: 200807/39 X-Sequence-Number: 18824 I am using Jboss application server on rhel 5. I have knowingly not configured anything which assumes that long running queries are to assumed as committed. Moreover if I restart the database when the query is still running, the transaction should be rolled back in totality, instead of that the roll back is unpredictable and messy i.e if 3rd query took a long time to finish then after restart 1 and 4th queries are rolled back but the 2nd and 3rd are not, the sequence may vary but it is never as it should be. with regards > Hi, > > > I am facing the following problem. > > > > Our application sends a block of queries to postgres in a > begin end > > block. If one of the queries take a long time to finish the whole > > transaction is assumed to be committed by the application even > though> the query is still running . This results in failure of > all subsequent > > transactions. > > > > Although the application is programmed to catch all exceptions > , it > > somehow is not able to figure out that the transaction is > still not > > complete. > > I may be missing something, but it seems to me that the problem > is your application wrongly assuming that queries taking a long > time to finish are assumed to be already committed? > > -- > Guillaume Cottenceau