Re: dropping column prevented due to inherited index

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: dropping column prevented due to inherited index
Date: 2019-10-03 12:18:12
Message-ID: 20191003121812.GA18476@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2019-10-03 12:25:54 Re: Collation versioning
Previous Message Dilip Kumar 2019-10-03 12:05:56 Re: [HACKERS] Block level parallel vacuum