Re: Nested Transactions, Abort All - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Nested Transactions, Abort All
Date
Msg-id 20040710015707.GA28878@dcc.uchile.cl
Whole thread Raw
In response to Re: Nested Transactions, Abort All  (Dennis Bjorklund <db@zigo.dhs.org>)
Responses Re: Nested Transactions, Abort All
Re: Nested Transactions, Abort All
List pgsql-hackers
On Fri, Jul 09, 2004 at 11:28:23PM +0200, Dennis Bjorklund wrote:
> On Fri, 9 Jul 2004, Alvaro Herrera wrote:
> 
> > Yes, we free some things.  Granted it's not a lot, but we have stacks
> > for several things that will be always be growing with savepoints,
> 
> They will not always be growing for savepoints, you can free things when 
> using savepoints just as with subtransactions.

I still don't see when I can release a savepoint's state.

You showed a particular case, where we can finish a released savepoint
that is the innermost transaction.  However, as soon as there is another
savepoint set after the released savepoint was set, we can't free the
second.

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.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"¿Qué importan los años?  Lo que realmente importa es comprobar que
a fin de cuentas la mejor edad de la vida es estar vivo"  (Mafalda)



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Nested Transactions, Abort All
Next
From: Bruce Momjian
Date:
Subject: Re: bug in DROP TABLESPACE