Re: Batch API for After Triggers

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Batch API for After Triggers
Дата
Msg-id CA+Tgmob9xbiyCpNTZ3qTQWv4bzou1qjCbHiVCDxQ2CB5dd0UEQ@mail.gmail.com
обсуждение исходный текст
Ответ на Batch API for After Triggers  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Batch API for After Triggers  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
On Sat, Jun 8, 2013 at 5:00 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> While fiddling with FK tuning, Noah suggested batching trigger
> executions together to avoid execution overhead.
>
> It turns out there is no easy way to write triggers that can take
> advantage of the knowledge that they are being executed as a set of
> trigger executions. Some API is required to allow a trigger to
> understand that there may be other related trigger executions in the
> very near future, so it can attempt to amortise call overhead across
> many invocations ("batching").
>
> The attached patch adds two fields to the TriggerDesc trigger
> functions are handed, allowing them to inspect (if they choose) the
> additional fields and thus potentially use some form of batching.

I'm unclear how this could be used in practice.  Are the events in a
"batch" guaranteed to, say, all be related to the same relation?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Cost limited statements RFC
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Server side lo-funcs name