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-10 05:51:37 |
Message-ID: | Pine.LNX.4.44.0407100743050.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:
> I mean this:
>
> begin;
> ... work ...;
> savepoint foo;
> ... more work ...;
> savepoint bar;
> ... yet more ... ;
> release foo;
>
>
> At this time I can't release savepoint foo because the implementation
> (nested) requires me to keep it open as long as savepoint bar exists.
> If I released bar at a later time, I could close both, but not before.
Yes, and that is exactly what should be done, what is wrong with that
behaviour?
If you do the same as above with nested transactions
BEGIN;
... work ...;
SUBBEGIN;
... more work ...;
SUBBEGIN;
... yet more ... ;
and now you can only commit the last subbegin. Subtransactions does not
give you anything more then savepoints in this example.
If anything there might be a possibility to do more with savepoints then
nested transactions since as you say, you can release an earlier savepoint
then the last. But that is something one can try to optimize later, if
possible to optimize at all.
Subtransactions can _not_ free more things then savepoints can. It's just
an empty argument.
In fact, I still see no real advantage to subtransactions at all. We are
only playing the lock-in game when we introduce postgresql features that
do almost the same thing as standard features.
--
/Dennis Björklund
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-07-10 06:00:18 | Re: [BUGS] BUG #1118: Misleading Commit message |
Previous Message | Tom Lane | 2004-07-10 05:41:04 | Re: Weird new time zone |