From: | Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Does a 'stable' deferred trigger execution order exist? -> answer: yes |
Date: | 2004-08-17 19:42:16 |
Message-ID: | 200408172142.17025.ftm.van.vugt@foxi.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> > Any execution order for regular triggers would be as good as any other
> This is perhaps true for "cleanly designed" applications, but people
> have requested that we nail down the execution order, and we have
> responded by specifying that it's alphabetical within an event.
I understand and actually meant to say that since nothing should 'depend' on
any particular order, executing these triggers alphabetically seems a logical
approach with the extra bonus you mention.
> The intention was certainly to apply this to AFTER as well
> as BEFORE triggers. We'll need to look and see why it's not working.
Just to avoid any misunderstandings:
- regular triggers DO execute in alphabetical order
- it's the deferred triggers that execute per event in order of definition
> > at least the sets itself are executed in the same order as the original
> > events they fired upon.
> Right. This is handled by appending new pending-trigger events to a
> global list when they are detected. Barring oddities such as different
> deferral specifications, they should be executed in order of detection.
That's the big 'YES' I was looking for ;-) Thanks.
> I would have expected triggers for the same event to be inserted in
> alphabetical order ...
Yep, me too, but apart from the fact that I'm o.k. with the way it currently
works, I imagine this is not exactly a high-priority issue right now ;-)
Thanks again for the replies.
--
Best,
Frank.
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2004-08-17 20:32:45 | Re: [HACKERS] SRPM for 8.0.0 beta? |
Previous Message | Tom Lane | 2004-08-17 19:29:28 | Re: PANIC: btree_split_redo: lost left sibling? |