From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Nested Transactions, Abort All |
Date: | 2004-07-12 00:40:19 |
Message-ID: | 200407120040.i6C0eJm19889@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera wrote:
> On Sun, Jul 11, 2004 at 03:15:46PM -0700, Josh Berkus wrote:
>
> > For that matter:
> >
> > begin;
> > savepoint;
> > select 0/0; -- abort
> > savepoint; -- commands will be ignored
> > select 1; -- commands will be ignored
> > release; -- commands will be ignored
> > release; -- abort main xact 'cause we didn't rollback
> > commit; -- abort message
> >
> > Is the above more or less correct, Alvaro?
>
> Save a minor detail. It would be
>
> begin;
> savepoint;
> select 0/0; -- abort
> savepoint; -- commands will be ignored
> select 1; -- commands will be ignored
> release; -- commands will be ignored
> release; -- commands will be ignored
> commit; -- abort message
>
> Note that I'm trying to tell you something with the indenting; all those
> commands are inside one and the same subtransaction.
>
> And I'm not planning to do anonymous savepoint. Do these buy us
> anything?
Don't bother if you can do named ones.
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Clift | 2004-07-12 00:42:25 | Re: Status report |
Previous Message | Alvaro Herrera | 2004-07-12 00:32:11 | Re: Nested Transactions, Abort All |