Re: Nested Transactions, Abort All - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: Nested Transactions, Abort All
Date
Msg-id 40F40A78.4060906@Yahoo.com
Whole thread Raw
In response to Re: Nested Transactions, Abort All  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-hackers
On 7/11/2004 12:22 AM, Alvaro Herrera wrote:

> There is not a lot of difference.  This was allowed in nested
> transactions because we wanted the nesting be to OK when using it in a
> possibly aborted transaction block, so the user would not commit a
> transaction that could not have been created.  In savepoints it's a
> nonissue because the command to end the outer xact is different.
> 
> 
> My opinion is that we should disallow both SAVEPOINT and RELEASE when in
> an aborted transaction block.  Only ROLLBACK TO, ROLLBACK and COMMIT
> would be allowed.  In this scenario, ROLLBACK TO would always return to
> a non-aborted transaction state, or the target savepoint would not
> exist and the state would remain the same.

As I interpret the spec ROLLBACK TO foo will rollback all savepoints 
that have been created since savepoint foo was created including ones 
explicitly released. That means, that every subxid >= foo is aborted, 
and a new foo subtransaction created.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Nested Transactions, Abort All
Next
From: Marko Karppinen
Date:
Subject: Re: Assisting developers