Re: [HACKERS] sql_drop Event Triggerg

2013-03-29 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@2ndquadrant.com writes: Pushed, with some further minor changes. One not-so-minor change I Thanks a lot for all the work you did put into this patch! introduced was that pg_event_trigger_dropped_objects() now only works within a sql_drop event function. The reason I

Re: [HACKERS] sql_drop Event Triggerg

2013-03-28 Thread Alvaro Herrera
Pushed, with some further minor changes. One not-so-minor change I introduced was that pg_event_trigger_dropped_objects() now only works within a sql_drop event function. The reason I decided to do this was that if we don't have that protection, then it is possible to have a ddl_command_end

Re: [HACKERS] sql_drop Event Triggerg

2013-03-26 Thread Alvaro Herrera
Robert Haas escribió: On Wed, Mar 20, 2013 at 5:42 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Here's a new version of this patch, rebased on top of the new pg_identify_object() stuff. Note that the regression test doesn't work yet, because I didn't adjust to the new identity

Re: [HACKERS] sql_drop Event Triggerg

2013-03-26 Thread Tom Lane
Alvaro Herrera alvhe...@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

Re: [HACKERS] sql_drop Event Triggerg

2013-03-26 Thread Alvaro Herrera
Tom Lane escribió: Alvaro Herrera alvhe...@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

Re: [HACKERS] sql_drop Event Triggerg

2013-03-26 Thread Robert Haas
On Tue, Mar 26, 2013 at 3:02 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I tried this and it doesn't work. The error pathways you speak about would be the xact.c entry points to commit and abort transactions; however, there's a problem with that because some of the commands that

Re: [HACKERS] sql_drop Event Triggerg

2013-03-26 Thread Alvaro Herrera
Robert Haas escribió: On Tue, Mar 26, 2013 at 3:02 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: 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

Re: [HACKERS] sql_drop Event Triggerg

2013-03-21 Thread Robert Haas
On Wed, Mar 20, 2013 at 5:42 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Here's a new version of this patch, rebased on top of the new pg_identify_object() stuff. Note that the regression test doesn't work yet, because I didn't adjust to the new identity output definition (the docs

Re: [HACKERS] sql_drop Event Triggerg

2013-03-20 Thread Alvaro Herrera
Here's a new version of this patch, rebased on top of the new pg_identify_object() stuff. Note that the regression test doesn't work yet, because I didn't adjust to the new identity output definition (the docs need work, too). But that's a simple change to do. I'm leaving that for later. --

Re: [HACKERS] sql_drop Event Triggerg

2013-03-08 Thread Robert Haas
On Tue, Mar 5, 2013 at 12:45 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Hmm, maybe I should be considering a pair of macros instead -- UTILITY_START_DROP and UTILITY_END_DROP. I'll give this a try. Other ideas are welcome. That seems like a possibly promising idea. I do wonder how

Re: [HACKERS] sql_drop Event Triggerg

2013-03-08 Thread Alvaro Herrera
Robert Haas escribió: On Tue, Mar 5, 2013 at 12:45 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Hmm, maybe I should be considering a pair of macros instead -- UTILITY_START_DROP and UTILITY_END_DROP. I'll give this a try. Other ideas are welcome. That seems like a possibly

Re: [HACKERS] sql_drop Event Triggerg

2013-03-08 Thread Robert Haas
On Fri, Mar 8, 2013 at 9:18 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas escribió: On Tue, Mar 5, 2013 at 12:45 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Hmm, maybe I should be considering a pair of macros instead -- UTILITY_START_DROP and UTILITY_END_DROP. I'll

Re: [HACKERS] sql_drop Event Triggerg

2013-03-08 Thread Alvaro Herrera
Robert Haas escribió: On Fri, Mar 8, 2013 at 9:18 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas escribió: On Tue, Mar 5, 2013 at 12:45 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Hmm, maybe I should be considering a pair of macros instead --

Re: [HACKERS] sql_drop Event Triggerg

2013-03-05 Thread Alvaro Herrera
Robert Haas escribió: On Mon, Mar 4, 2013 at 4:59 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Alvaro Herrera escribió: I think this is mostly ready to go in. I'll look at your docs, and unless there are more objections will commit later or early tomorrow. Actually it still

Re: [HACKERS] sql_drop Event Triggerg

2013-03-05 Thread Alvaro Herrera
Robert Haas escribió: Or at least move the save/restore logic into something inside the deletion machinery itself so that new callers don't have to worry about it? I don't think that works well; precisely the point of the initialize/finalize pair of functions is to bracket the drop so