Re: dropping column prevented due to inherited index

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Amit Langote <amitlangote09(at)gmail(dot)com>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, 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-09 09:36:35
Message-ID: 20191009093635.GA24368@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2019-10-09 10:12:18 Re: maintenance_work_mem used by Vacuum
Previous Message Amit Kapila 2019-10-09 09:10:29 Re: maintenance_work_mem used by Vacuum