Re: Proposal: Local indexes for partitioned table

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Maksim Milyutin <m(dot)milyutin(at)postgrespro(dot)ru>
Subject: Re: Proposal: Local indexes for partitioned table
Date: 2017-10-23 15:49:50
Message-ID: CA+TgmoYDAtgxb+ynKW5ePe_rifGOMfDnAKARt=D+pqSJxQyBxg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 23, 2017 at 11:12 AM, Alvaro Herrera
<alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> I started with Maksim's submitted code, and developed according to the
> ideas discussed in this thread. Attached is a very WIP patch series for
> this feature.
>
> Many things remain to be done before this is committable: pg_dump
> support needs to be written. ALTER INDEX ATTACH/DETACH not yet
> implemented. No REINDEX support yet. Docs not updated (but see the
> regression test as a guide for how this is supposed to work; see patch
> 0005). CREATE INDEX CONCURRENTLY not done yet.
>
> I'm now working on the ability to build unique indexes (and unique
> constraints) on top of this.

Cool. Are you planning to do that by (a) only allowing the special
case where the partition key columns/expressions are included in the
indexed columns/expressions, (b) trying to make every insert to any
index check all of the indexes for uniqueness conflicts, or (c)
implementing global indexes? Because (b) sounds complex - think about
attach operations, for example - and (c) sounds super-hard. I'd
suggest doing (a) first, just on the basis of complexity.

I hope that you don't get so involved in making this unique index
stuff work that we don't get the cascading index feature, at least,
committed to v11. That's already a considerable step forward in terms
of ease of use, and I'd really like to have it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-10-23 16:15:03 Re: Proposal: Local indexes for partitioned table
Previous Message Tom Lane 2017-10-23 15:22:47 Re: [sqlsmith] Failed assertion in adjust_appendrel_attrs_mutator