Re: Nested Transactions, Abort All

Поиск
Список
Период
Сортировка
Искать
От
Josh Berkus
Тема
Re: Nested Transactions, Abort All
Дата
Msg-id
200407111515.47151.josh@agliodbs.com
Ответ на
Список
Дерево обсуждения
Re: Nested Transactions, Abort All Mike Rylander <miker@purplefrog.com>
Alvaro,

> I have a better question: do we allow SAVEPOINT (i.e. to establish a
> savepoint, i.e. to open a nested transaction) within an aborted
> transaction block?

My opinion?  No.   I would personally not want to allow it.

> My opinion is that we should disallow both SAVEPOINT and RELEASE when in
> an aborted transaction block.  Only ROLLBACK TO, ROLLBACK and COMMIT
> would be allowed.  

I agree.

> In this scenario, ROLLBACK TO would always return to
> a non-aborted transaction state, or the target savepoint would not
> exist and the state would remain the same.

This is also good.

From my perspective, as a builder of some *very* database-centric 
applications, if one has an abort contidition that proceeds to try to 
establish a Savepoint as if the abort didn't exist then one needs to do some 
debugging.  I'm sorry I missed the original discussion on this or I would 
have expressed this opinion earlier. 

For that matter:

begin;savepoint;	select 0/0;  -- abort	savepoint;  -- commands will be ignored		select 1; -- commands will be ignored	release; -- commands will be ignoredrelease; -- abort main xact 'cause we didn't rollback
commit; -- abort message

Is the above more or less correct, Alvaro?

-- 
-Josh BerkusAglio Database SolutionsSan Francisco


В списке pgsql-hackers по дате отправления
От: Josh Berkus
Дата:
От: Scott Marlowe
Дата:
FAQ