Skip site navigation (1) Skip section navigation (2)

Re: Transaction handling through java

From: nalini <nalini(at)nic(dot)in>
To: Guillaume Cottenceau <gc(at)mnc(dot)ch>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Transaction handling through java
Date: 2008-07-16 08:35:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
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

In response to

pgsql-jdbc by date

Next:From: Pushker ChaubeyDate: 2008-07-16 08:36:16
Subject: Re: Transaction handling through java
Previous:From: Guillaume CottenceauDate: 2008-07-16 08:01:32
Subject: Re: Transaction handling through java

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group