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

From Andreas Pflug
Subject Re: Nested Transactions, Abort All
Date
Msg-id 40EF9C02.1030400@pse-consulting.de
Whole thread Raw
In response to Re: Nested Transactions, Abort All  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
Simon Riggs wrote:

>>>BEGIN
>>>            display one screen to user - book the flight
>>>    INSERT INTO ...
>>>    INSERT INTO ...
>>>    UPDATE ...
>>>    SAVEPOINT
>>>            display another related screen - book the hotel
>>>    INSERT INTO
>>>    DELETE
>>>    UPDATE
>>>    UPDATE
>>>    SAVEPOINT
>>>            offer confirmation screen
>>>COMMIT (or ROLLBACK)
>>> 
>>>
>>>      
>>>
>>No, SAVEPOINT is not some kind of intermediate commit, but a point where 
>>a rollback can rollback to.
>>    
>>
>
>Hmmm....I'm not sure what you mean by "No". The SAVEPOINT is somewhere
>you can ROLLBACK to, yes - exactly what I'm saying. 
>
>I've not introduced any concept of "intermediate commit"...
>
>Do you agree that my example is valid Oracle SQL? 
>  
>
If you name that SAVEPOINT statements, yes. But the ordering of 
statements makes the second savepoint useless, because it's after all 
datamodifying statements; the first three are not covered by a savepoint 
at all, only the toplevel xaction. That's probably not what you wanted.

Regards,
Andreas


pgsql-hackers by date:

Previous
From: Dennis Bjorklund
Date:
Subject: Re: Nested Transactions, Abort All
Next
From: Andreas Pflug
Date:
Subject: Re: Nested Transactions, Abort All