Thread: nested transactions
Hi, I am aware that at least 7.1 did not support nested transactions and it's my impression that 7.2 doesn't either. Am I correct about this? Also, are nexted transactions "on the board," and if so, when/what release are they planned for? Thanks in advance... -------------------------------------------------------------- Steven D. Arnold Neosynapse stevena@neosynapse.net Managing Partner AIM: abraxan MSN: neosynapse@hotmail.com
On Mon, 22 Apr 2002 17:01:27 -0400 "Steven D. Arnold" <stevena@neosynapse.net> wrote: > Hi, > > I am aware that at least 7.1 did not support nested transactions and > it's my impression that 7.2 doesn't either. Am I correct about this? Yes. > 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. Cheers, Neil -- Neil Conway <neilconway@rogers.com> PGP Key ID: DB3C29FC
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
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)
Neil Conway wrote: > On Mon, 22 Apr 2002 17:01:27 -0400 "Steven D. Arnold" > <stevena@neosynapse.net> wrote: > > Hi, > > > > I am aware that at least 7.1 did not support nested transactions and > > it's my impression that 7.2 doesn't either. Am I correct about this? > > Yes. > > > 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. See the 'transactions' link from the TODO page for more detailed implementation issues. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026