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 20191003121812.GA18476@alvherre.pgsql
Whole thread Raw
In response to Re: dropping column prevented due to inherited index  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: dropping column prevented due to inherited index  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On 2019-Oct-03, Amit Langote wrote:

> There may not really be any problem with the commit itself, but I
> suspect that the new types of dependencies (or the way
> findDependentObject() analyzes them) don't play well with inheritance
> recursion of ATExecDropColumn().  Currently, child columns (and its
> dependencies) are dropped before the parent column (and its
> dependencies).  By using the attached patch which reverses that order,
> the error goes away, but I'm not sure that that's the correct
> solution.

Hmm.  I wonder if we shouldn't adopt the coding pattern we've used
elsewhere of collecting all columns to be dropped first into an
ObjectAddresses array, then use performMultipleDeletions.

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



pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: [HACKERS] Block level parallel vacuum
Next
From: Thomas Munro
Date:
Subject: Re: Collation versioning