Re: Indexes on partitioned tables and foreign partitions - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Indexes on partitioned tables and foreign partitions
Date
Msg-id CAFjFpRe+AnFGS_m=K8T1S9j0wuwU__FMz08=8B3DQ23SH=q3Pw@mail.gmail.com
Whole thread Raw
In response to Re: Indexes on partitioned tables and foreign partitions  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-hackers
On Thu, May 10, 2018 at 8:30 AM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
>
> How about we error out even *before* calling DefineIndex for the 1st time?
>  I see that ProcessUtilitySlow() gets a list of all partitions when
> locking them for index creation before calling DefineIndex.  Maybe, just
> go through the list and error out if one of them is a partition that we
> don't support creating an index on?

+1 for the idea. We don't want to spend efforts in DefineIndex for
some relations only to throw away that work later. I quickly looked at
the patch and I think it's on right track.

-- 
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company


pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: Expression errors with "FOR UPDATE" and postgres_fdw with partitionwise join enabled.
Next
From: Robert Haas
Date:
Subject: Re: Should we add GUCs to allow partition pruning to be disabled?