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

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

From: "j(dot)random(dot)programmer" <javadesigner(at)yahoo(dot)com>
To: pg(at)fastcrypt(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Weird behavior in transaction handling (Possible bug ?) -- commit fails silently
Date: 2005-01-14 16:29:56
Message-ID: 20050114162956.91766.qmail@web14227.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
> With postgres once an error occurs in a transaction
block you need
> to rollback. None of the transaction will commit.
> 
> This behaviour makes sense as it assumes that the
transaction block
> is atomic and it should all succeed or all fail.


This is VERY counter-intuitive. I can have really
important data
for say 5 tables which has committed properly but at
the 6th
insert into a non-important auxillary table, I may
encounter a
transient exception. I still want to be able to commit
my data.

There are many similar scenarios such as the above,
right ?

As a programmer, shouldn't it be upto me to decide
when to
commit and when to rollback ?  Is this even within
spec ? And
at the very least, commit() should then not fail
SILENTLY ! (and
this should be documented).

:-]

Best regards,

--j


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

In response to

Responses

pgsql-jdbc by date

Next:From: Vadim NasardinovDate: 2005-01-14 16:42:54
Subject: Re: Weird behavior in transaction handling (Possible bug ?)
Previous:From: Dave CramerDate: 2005-01-14 16:23:35
Subject: Re: Weird behavior in transaction handling (Possible bug ?)

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