Re: Nested Transactions, Abort All

Поиск
Список
Период
Сортировка
От Thomas Swan
Тема Re: Nested Transactions, Abort All
Дата
Msg-id 40EC6219.8050301@idigx.com
обсуждение исходный текст
Ответ на Re: Nested Transactions, Abort All  ("Scott Marlowe" <smarlowe@qwest.net>)
Список pgsql-hackers
Scott Marlowe wrote:

>On Tue, 2004-07-06 at 23:36, Greg Stark wrote:
>  
>
>>"Scott Marlowe" <smarlowe@qwest.net> writes:
>>
>>    
>>
>>>Why not rollback all or commit all?
>>>
>>>I really really don't like subbegin and subcommit.  I get the feeling
>>>they'll cause more problems we haven't foreseen yet, but I can't put my
>>>finger on it.  
>>>      
>>>
>>Well I've already pointed out one problem. It makes it impossible to write
>>generic code or reuse existing code and embed it within a transaction. Code
>>meant to be a nested transaction within a larger transaction becomes
>>non-interchangeable with code meant to be run on its own.
>>    
>>
>
>Would a rollback N / abort N where N is the number of levels to rollback
>/ abort work?  
>
>  
>
Only, if you know the number of levels you are deep in the transaction.  

"ROLLBACK n" and "ROLLBACK ALL" together would be good alternatives to 
unwind nested transaction.  Perhaps a function for 
pg_transaction_nested_level( ) or a pg_transaction_nested_level variable 
could help in this.

Again, these are just opinions.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Darko Prenosil"
Дата:
Сообщение: tsearch and win32 (again)
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Loadable Oracle Personality: WAS "LinuxTag wrapup"