Re: Nested xacts: looking for testers and review
От | Stephan Szabo |
---|---|
Тема | Re: Nested xacts: looking for testers and review |
Дата | |
Msg-id | 20040530035204.U51879@megazone.bigpanda.com обсуждение исходный текст |
Ответ на | Re: Nested xacts: looking for testers and review (Alvaro Herrera <alvherre@dcc.uchile.cl>) |
Ответы |
Re: Nested xacts: looking for testers and review
|
Список | pgsql-hackers |
On Sat, 29 May 2004, Alvaro Herrera wrote: > On Sat, May 29, 2004 at 08:25:27AM -0700, Stephan Szabo wrote: > > > BTW: For the deferred trigger stuff, I am guessing you haven't touched > > that at all in the current patch? > > > > I wonder if the following would work assuming that we want deferred > > triggers to run at outer transaction end? > > Ah, this seems to work. I'll implement it and I'll let you know how it > goes. Ugh... There's one further wrinkle I hadn't thought about, imagine the following: begin;-- here the transaction does something that makes deferred trigger-- entriesbegin; set constraints all immediate; --we now run through doing the deferred trigger itemsrollback;-- we need to unmark that the deferred items from the-- outertransaction have been run. However, in general,-- it might not be all entries nor all entries that are marked-- asdone. I'm not sure how expensive it is to check if a given subxact has committed, but maybe instead of just done/not done, we need to say something like what xid marked the trigger and instead of if (!(event->dte_event & (TRIGGER_DEFERRED_DONE | TRIGGER_DEFERRED_CANCELED))) inside deferredTriggerInvokeEvents we do something like: if (!((event->dte_event & (TRIGGER_DEFERRED_DONE | TRIGGER_DEFERRED_CANCELED)) && /*something to check that the marking xact is either myself or a committed subxact*/))
В списке pgsql-hackers по дате отправления: