On Sat, Jun 8, 2013 at 5:00 PM, Simon Riggs <si...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers