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

From Oliver Jowett
Subject Re: Nested Transactions, Abort All
Date
Msg-id 40EF1250.4030204@opencloud.com
Whole thread Raw
In response to Re: Nested Transactions, Abort All  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: Nested Transactions, Abort All
Re: Nested Transactions, Abort All
List pgsql-hackers
Alvaro Herrera wrote:

> We can't actually release anything (commit the subtransactions), because
> they may be savepoints established after that point, and they are
> logically "inside" the previously established ones.  At RELEASE we can't
> really release -- we just lose the name and thus the opportunity to
> rollback to it.

The 2003 draft claims that RELEASE SAVEPOINT invalidates savepoints 
subsequent to the RELEASE:

1) Let S be the <savepoint name>.
2) If S does not identify a savepoint established in the current 
savepoint level,then an exception condition is raised:savepoint 
exception  invalid specification.
3) The savepoint identified by S and all savepoints established in the 
current savepoint level subsequent to the establishment of S are destroyed.

So it sounds like we can commit the subtransaction on RELEASE.

Note that this is *not* the same when a savepoint name is reused; that 
just moves the name, but "contained" savepoints are still valid.

-O


pgsql-hackers by date:

Previous
From: spock@mgnet.de
Date:
Subject: Re: Point in Time Recovery
Next
From: Oliver Jowett
Date:
Subject: Re: Nested Transactions, Abort All