Re: sql_drop Event Trigger - Mailing list pgsql-hackers

From Tom Lane
Subject Re: sql_drop Event Trigger
Date
Msg-id 6149.1360166664@sss.pgh.pa.us
Whole thread Raw
In response to Re: sql_drop Event Trigger  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: sql_drop Event Trigger
Re: sql_drop Event Trigger
List pgsql-hackers
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>> I thought there was the idea that the list of objects to drop was to be
>> acquired before actually doing the deletion; so that the trigger
>> function could, for instance, get the name of the table being dropped.

> Tom and Robert have been rightfully insisting on how delicate it has
> been to come up with the right behavior for performMultipleDeletions,
> and that's not something we can easily reorganise.

> So the only way to get at the information seems to be what Robert
> insisted that I do, that is storing the information about the objects
> being dropped for later processing.

I might be forgetting something, but doesn't dependency.c work by first
constructing a list of all the objects it's going to drop, and only then
dropping them?  Could we inject a "pre deletion" event trigger call at
the point where the list is completed?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system
Next
From: Fujii Masao
Date:
Subject: Re: [PATCH] pg_isready (was: [WIP] pg_ping utility)