Re: set relispartition when attaching child index - Mailing list pgsql-hackers

From Amit Langote
Subject Re: set relispartition when attaching child index
Date
Msg-id CA+HiwqG3k_S8UpVHNX8LhqkD-H-XziTcPQZDdHd5bip0nMwAyQ@mail.gmail.com
Whole thread Raw
In response to Re: set relispartition when attaching child index  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: set relispartition when attaching child index
List pgsql-hackers
On Thu, Apr 25, 2019 at 12:35 AM Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> On 2019-Apr-25, Amit Langote wrote:
>
> > It seems that DefineIndex() is forgetting to update_relispartition()
> > on a partition's index when it's attached to an index being added to
> > the parent.  That results in unexpected behavior when adding a foreign
> > key referencing the parent.
>
> BTW, maybe IndexSetParentIndex ought to be the one calling
> update_relispartition() ...

I thought so too, but other sites are doing what I did in the patch.

Thanks,
Amit



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: set relispartition when attaching child index
Next
From: Amit Langote
Date:
Subject: Re: set relispartition when attaching child index