Re: Event Triggers: adding information
Dimitri Fontaine <dimitri@2ndquadrant.fr>
From: Dimitri Fontaine <dimitri@2ndQuadrant.fr>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2013-01-24T09:35:41Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > Or maybe we should just silently ignore failures to look up the event > trigger. That might be better, because the DBA could always do: > > DROP FUNCTION myeventtrgfn() CASCADE; > > ...and it would be undesirable for other sessions to error out in that > case due to SnapshotNow effects. What about taking a lock on the functions we decide we will need to be running, maybe a ShareUpdateExclusiveLock, so that the function can not disappear under us from concurrent activity? Note to self, most probably using: LockRelationOid(fnoid, ShareUpdateExclusiveLock); After all, we might be right not to optimize for DDL concurrency… Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support