Re: Nested Transactions, Abort All

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: Nested Transactions, Abort All
Дата
Msg-id 40F40A78.4060906@Yahoo.com
обсуждение исходный текст
Ответ на Re: Nested Transactions, Abort All  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-hackers
On 7/11/2004 12:22 AM, Alvaro Herrera wrote:

> There is not a lot of difference.  This was allowed in nested
> transactions because we wanted the nesting be to OK when using it in a
> possibly aborted transaction block, so the user would not commit a
> transaction that could not have been created.  In savepoints it's a
> nonissue because the command to end the outer xact is different.
> 
> 
> 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.  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.

As I interpret the spec ROLLBACK TO foo will rollback all savepoints 
that have been created since savepoint foo was created including ones 
explicitly released. That means, that every subxid >= foo is aborted, 
and a new foo subtransaction created.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



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

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: Nested Transactions, Abort All
Следующее
От: Marko Karppinen
Дата:
Сообщение: Re: Assisting developers