Re: Nested Transactions, Abort All

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: josh(at)agliodbs(dot)com
Cc: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Nested Transactions, Abort All
Date: 2004-07-10 21:39:33
Message-ID: 200407102139.i6ALdXm17190@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Josh Berkus wrote:
> Dennis,
>
> > The non-standard part I was talking about was the savepoints without
> > names, and that is what we should support for ever if we introduce them.
>
> I don't have a problem with that idea. Anonymous Savepoints should be easy
> to support if we are supporting Named (spec) Savepoints. And the two should
> even integrate easily -- a *lot* more easily than Savepoints and Nested Xacts
> with a different syntax would. And, it's also a convenient shortcut for the
> most common case -- transactions with 1 level of nesting and only a couple of
> non-overlapping savepoints.
>
> Of course, if Alvaro can knock out Named Savepoints in a week, then sure,
> let's go for it. But I've not heard him saying he can.

It seems anonymous savepoints really don't buy us anything. They don't
match the Oracle behavior, and don't do anything more than nested
transactions. I agree we want them, but I don't see the value they add
value right now.

> However, this does bring up an important issue; if we implement anonymous
> savepoints, then should the current implementation accept savepoint names and
> just ignore them? If not, it makes porting and coding for the spec much
> more difficult; if so, ported applications could develop subtle erroneous
> behaviour through wrong rollbacks.

I don't see how we can ignore the savepoint names without having our
code work unpredicatably. We could check for the most recent savepoint
name and error out if they reference any other name than the most recent
savepoint.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2004-07-10 21:57:46 Re: Nested Transactions, Abort All
Previous Message Bruce Momjian 2004-07-10 21:36:59 Re: Nested Transactions, Abort All