Re: Nested Transactions, Abort All

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Nested Transactions, Abort All
Дата
Msg-id 200407111507.50444.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: Nested Transactions, Abort All  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce,

> Do we want to allow BEGIN NESTED to start a main transaction?  Oracle
> can use SAVEPOINTS all the time because it knows it is always in a
> transaction, but PostgreSQL is not always.  I don't see a downside to
> allowing it.  COMMIT will still commit the entire transaction, of
> course.

Hmmm.   I can see where this could cause trouble, allowing users and 
developers to be unclear about whether or not they are in an explicit 
transaction and thus leading to significant debugging issues.   So I'm not 
keen on, it, no.    

What's the benefit?  Elein?

And before you start the "function" argument:  due to function autocommit, a 
function is automatically part of a main implict transaction.  So functions 
are a non-argument as they will *always* be using NESTED/SAVEPOINT.   This 
would only become a concern if we started supporting non-transactional stored 
procedures (ala Sybase) which nobody has even discussed working on.

-- 
-Josh BerkusAglio Database SolutionsSan Francisco



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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Nested Transactions, Abort All
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Nested Transactions, Abort All