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

Re: Weird behavior in transaction handling (Possible bug ?) -- commit fails silently

From: Jan de Visser <jdevisser(at)digitalfairway(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Weird behavior in transaction handling (Possible bug ?) -- commit fails silently
Date: 2005-01-14 19:10:19
Message-ID: 200501141410.19681.jdevisser@digitalfairway.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
On January 14, 2005 01:51 pm, j.random.programmer wrote:
[...]
> I was simple catching the exception but not rolling
> back since
> I presumed the rest of the transaction would succeed
> (and
> commit() didn't complain). It's only after playing
> around that I
> realized that the transaction was failing because of
> the earlier
> error.
>
[...]
>
> So maybe, the database folks can do something about
> this in version 8.0. Maybe you can also forward this
> message
> to the core postgres folks ?
>

I *strongly* disagree. As mentioned before, a transaction is supposed to be an 
*atomic* unit of work; either it succeeds completely or it's not executed at 
all. Consider the canonical example of a transaction: money being tranfered 
from one account to another. You don't want one update to be committed if the 
other failed. 

JdV!!


-- 
--------------------------------------------------------------
Jan de Visser                     jdevisser(at)digitalfairway(dot)com

                Baruk Khazad! Khazad ai-menu!
--------------------------------------------------------------

In response to

pgsql-jdbc by date

Next:From: Dave CramerDate: 2005-01-14 19:19:15
Subject: Re: Weird behavior in transaction handling (Possible bug ?)
Previous:From: j.random.programmerDate: 2005-01-14 18:51:15
Subject: Re: Weird behavior in transaction handling (Possible bug ?) -- commit fails silently

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