Re: transaction processing after error in statement

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: holger(at)jakobs(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: transaction processing after error in statement
Date: 2003-11-09 22:09:12
Message-ID: 20031109140156.T85218@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, 7 Nov 2003 holger(at)jakobs(dot)com wrote:

> Whenever an error occurs within the transaction, PostgreSQL puts the
> whole transaction in an *ABORT* state, so that there is no difference at
> all between COMMITing or ROLLBACKing it. Even commands successfully
> carried out before the error ocurred are rolled back, even if I COMMIT
> the transaction, where no error message whatsoever is shown.

In PostgreSQL all errors are currently considered unrecoverable, and all
statements in a transaction must commit or rollback together as a single
unit.
In the future an implementation of nested transactions or savepoints would
presumably relax this limitation to only the successfully committed
subtransactions or statements that were not separately rolled back to a
previous savepoint.

> Additionally, I have discovered that phantom reads occur in PostgreSQL
> even if isolation mode serializable is used. Also not so nice!

You're going to have to give more information for anyone to even begin to
understand the case you're seeing.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christopher Browne 2003-11-10 02:59:14 Re: help me...
Previous Message Chester Kustarz 2003-11-09 21:14:11 Re: transaction management in plpgsql functions