Re: Does a 'stable' deferred trigger execution order exist? -> answer: yes

Поиск
Список
Период
Сортировка
От Frank van Vugt
Тема Re: Does a 'stable' deferred trigger execution order exist? -> answer: yes
Дата
Msg-id 200408172142.17025.ftm.van.vugt@foxi.nl
обсуждение исходный текст
Ответ на Re: Does a 'stable' deferred trigger execution order exist? -> answer: yes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PANIC: btree_split_redo: lost left sibling?
Следующее
От: Joe Lester
Дата:
Сообщение: Re: shared_buffers Question