Re: Nested Transactions, Abort All

Поиск
Список
Период
Сортировка
От Dennis Bjorklund
Тема Re: Nested Transactions, Abort All
Дата
Msg-id Pine.LNX.4.44.0407100758260.2838-100000@zigo.dhs.org
обсуждение исходный текст
Ответ на Re: Nested Transactions, Abort All  (Mike Rylander <miker@purplefrog.com>)
Ответы Re: Nested Transactions, Abort All
Список pgsql-hackers
On Fri, 9 Jul 2004, Mike Rylander wrote:

> Nested transactions and savepoints serve two different purposes.  They have
> some overlap, but for the most part solve two distinct problems.

Then show some examples that illustrait the difference. So far all 
examples shown that uses subtransactions could just as well have been 
written using savepoints.

I don't agree that they have two different purposes.

> I don't think so, especially as there has been some talk of implimenting
> savepoints as a subset of nested transactions.

It is not a subset. It's the other way around. Nested transactions are a
subset of savepoints

Savepoints have more possibilities, you can invalidate older savepoints 
then the last (with subtransactions you can only commit/rollback the 
last). If you don't use that then it's exactly the same as 
subtransactions.

The only "feature" subtransactions have that savepoints doesn't is the
lack of names. Every savepoint have a name. If we want an extension it 
could be to get the database to generate a fresh savepoint name. The 
client can of course also generate unique savepoint names if it want.

That subtransactions do more than savepoints is just smoke an mirrors. So
far there have been no example to validate that point of view, and I don't
think there will be any. If anyone know of something that you can do with
subtransactions and not with savepoints, please speak up.

-- 
/Dennis Björklund



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

Предыдущее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: User Quota Implementation
Следующее
От: Gavin Sherry
Дата:
Сообщение: Re: Nested Transactions, Abort All