Skip site navigation (1) Skip section navigation (2)

Re: Nested Transactions, Abort All

From: Thomas Swan <tswan(at)idigx(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Nested Transactions, Abort All
Date: 2004-07-02 16:18:08
Message-ID: 40E58AC0.8080805@idigx.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane wrote:

>Mike Benoit <ipso(at)snappymail(dot)ca> writes:
>  
>
>>On Thu, 2004-07-01 at 18:38 -0400, Alvaro Herrera wrote:
>>    
>>
>>>If we change the syntax, say by using SUBCOMMIT/SUBABORT for
>>>subtransactions, then using a simple ABORT would abort the whole
>>>transaction tree.
>>>      
>>>
>
>  
>
>>But then we're back to the application having to know if its in a
>>regular transaction or a sub-transaction aren't we? To me that sounds
>>just as bad. 
>>    
>>
>
>Someone (I forget who at this late hour) gave several cogent arguments
>that that's *exactly* what we want.  Please see the prior discussion...
>
>Right at the moment I think we have a consensus that we should use
>SUBBEGIN/SUBEND or some such keywords for subtransactions.  (I do not
>say we've agreed to exactly those keywords, only that it's a good idea
>to make them different from the outer-level BEGIN/END keywords.)
>
>  
>
Either approach still needs some mechanism to clear the current stack of 
transactions and subtransactions.   That's why I was thinking ABORT ALL 
and ROLLBACK ALL would be sufficient to cover that and be clear enough 
to the user/programmer.

>There was also some talk of offering commands based around the notion of
>savepoints, but I'm not sure that we have a consensus on that yet.
>
>			regards, tom lane
>  
>


In response to

pgsql-hackers by date

Next:From: Joshua D. DrakeDate: 2004-07-02 16:48:54
Subject: Re: compile errors in new PL/Pler
Previous:From: Andrew DunstanDate: 2004-07-02 15:43:25
Subject: Re: compile errors in new PL/Pler

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group