Re: sql_drop Event Triggerg - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: sql_drop Event Triggerg
Date
Msg-id 20130326192213.GC3881@alvh.no-ip.org
Whole thread Raw
In response to Re: sql_drop Event Triggerg  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: sql_drop Event Triggerg  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Tom Lane escribió:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > Now there *is* one rather big performance problem in this patch, which
> > is that it turns on collection of object dropped data regardless of
> > there being event triggers that use the info at all.  That's a serious
> > drawback and we're going to get complaints about it.  So we need to do
> > something to fix that.
>
> > One idea that comes to mind is to add some more things to the grammar,
> > CREATE EVENT TRIGGER name ... WITH ('DROPPED OBJECTS');
>
> Uh ... surely we can just notice whether there's a trigger on the
> object-drop event?  I don't understand why we need *yet more*
> mechanism here.

There's no object-drop event, only ddl_command_end.  From previous
discussion I understood we didn't want a separate event, so that's what
we've been running with.

However, I think previous discussions have conflated many different
things, and we've been slowly fixing them one by one; so perhaps at this
point it does make sense to have a new object-drop event.  Let's discuss
it -- we would define it as taking place just before ddl_command_end,
and firing any time a command (with matching tag?) has called
performDeletion or performMultipleDeletions.  Does that sound okay?

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: plpgsql_check_function - rebase for 9.3
Next
From: Robert Haas
Date:
Subject: Re: sql_drop Event Triggerg