Re: Indexes on partitioned tables and foreign partitions

From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Arseny Sher <a(dot)sher(at)postgrespro(dot)ru>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Indexes on partitioned tables and foreign partitions
Date: 2018-05-10 13:19:00
Message-ID: CAFjFpRe+AnFGS_m=K8T1S9j0wuwU__FMz08=8B3DQ23SH=q3Pw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 10, 2018 at 8:30 AM, Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-05-10 14:22:43 Re: Should we add GUCs to allow partition pruning to be disabled?
Previous Message Etsuro Fujita 2018-05-10 12:53:22 Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.