Re: dropping column prevented due to inherited index - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: dropping column prevented due to inherited index
Date
Msg-id 20191009093635.GA24368@alvherre.pgsql
Whole thread Raw
In response to Re: dropping column prevented due to inherited index  (Michael Paquier <michael@paquier.xyz>)
Responses Re: dropping column prevented due to inherited index
List pgsql-hackers
On 2019-Oct-09, Michael Paquier wrote:

> On Tue, Oct 08, 2019 at 06:25:05PM +0900, Amit Langote wrote:
> > I thought about doing something like that, but wasn't sure if
> > introducing that much complexity is warranted.
> 
> I looked at that.  By experience, I think that it would be wiser to do
> first the lookup of all the dependencies you would like to delete, and
> then let the internal dependency machinery sort things out after
> recursing (remember recent fixes related to ON COMMIT actions).  In
> order to do that, you actually just need to be careful to not trigger
> the deletions as long as "recursing" is true because ATExecDropColumn
> calls itself.  And it is not actually as bad as I assumed, please see
> the attached.

Right, something like that.  Needs a comment to explain what we do and
how recursing=true correlates with addrs=NULL, I think.  Maybe add an
assert.

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



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: maintenance_work_mem used by Vacuum
Next
From: Dilip Kumar
Date:
Subject: Re: maintenance_work_mem used by Vacuum