Re: Nested Transactions, Abort All

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>, Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>, Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>, Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Nested Transactions, Abort All
Date: 2004-07-09 21:46:56
Message-ID: 40EF1250.4030204@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Jowett 2004-07-09 21:47:41 Re: Nested Transactions, Abort All
Previous Message Dennis Bjorklund 2004-07-09 21:28:23 Re: Nested Transactions, Abort All