From: | Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org> |
---|---|
To: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, 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 20:53:07 |
Message-ID: | Pine.LNX.4.44.0407092240060.2838-100000@zigo.dhs.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 9 Jul 2004, Alvaro Herrera wrote:
> > Simon posted it. It is called RELEASE:
>
> 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.
You can still perform the release. If we have
SAVEPOINT p1;
SAVEPOINT p2;
RELEASE p2;
then it's no problem, we released the topmost savepoint (commit the
corresponding subtransaction). And if we have
SAVEPOINT p1;
SAVEPOINT p2;
RELEASE p1;
now you are saying that we just forget the name p1 and the subtransaction
for p1 is still there for ever.
But one should also link the subtransaction for p1 to p2, so when p2 is
released then also the (now unnamed) subtransaction for p1 is commited. Of
course we can't release p1 as long as p2 is still active. p2 is logically
a subtransaction of p1.
One don't really need an explicit link. When p2 is released all one needs
to do is to look at the parent and see if that is still named, if not it
should be commited and so on until we reach a named one.
--
/Dennis Björklund
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Swan | 2004-07-09 21:05:09 | Re: Nested Transactions, Abort All |
Previous Message | Bruce Momjian | 2004-07-09 20:48:59 | Re: Nested Transactions, Abort All |