Re: nested transactions

Поиск
Список
Период
Сортировка
От Ian Harding
Тема Re: nested transactions
Дата
Msg-id scc42e60.089@mail.tpchd.org
обсуждение исходный текст
Ответ на nested transactions  ("Steven D. Arnold" <stevena@neosynapse.net>)
Список pgsql-general
From my SQL Server days, I remember the nested transactions feature being one that I spent a lot of time trying to
undo. As I recall, if you had a trigger that called a function (stored procedure) and the SP threw an error, the
triggerwould merrily go about its business as if nothing had happened.  You had to encircle each sql statement with
errortrapping code, and if one was found, see how far into the nest of transactions you were, and roll back the
transaction(if you were in one) then set the return code to let all the higher level transactions know something went
wrong,so each of them could decide whether to roll back. 

If the error checking was in the DBMS (instead of having to be written by hand) and the nested transactions rolled each
otherback if an error was detected, wouldn't  we be back where we are now? 

What's the benefit?

- Ian

>>> Tom Lane <tgl@sss.pgh.pa.us> 04/22/02 03:11PM >>>
Neil Conway <nconway@klamath.dyndns.org> writes:
> "Steven D. Arnold" <stevena@neosynapse.net> wrote:
>> Also, are nexted transactions "on the board," and if so, when/what
>> release are they planned for?

> They're on the TODO list, but AFAIK no one has volunteered to implement
> them yet.

Steven should probably be warned that this is a "don't hold your breath"
kind of thing.  AFAICS, nested transactions would require a huge amount
of work by very knowledgeable hackers (for example, looking at nearly
every error-exit condition in the backend, to see if it's going to cause
a problem with continuing the current transaction).  The small number
of people who could do it have other priorities.

            regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


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

Предыдущее
От: Paul M Foster
Дата:
Сообщение: Re: Returns from ExecTuplesOk() SOLVED
Следующее
От: Curt Sampson
Дата:
Сообщение: Re: One particular large database application