Re: Proposal: Local indexes for partitioned table

From: Maksim Milyutin <m(dot)milyutin(at)postgrespro(dot)ru>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: Local indexes for partitioned table
Date: 2017-03-02 11:09:24
Message-ID: b97b345b-3cae-3c96-980d-a4e989c3f634@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02.03.2017 11:41, Robert Haas wrote:
> Sounds generally good. One thing to keep in mind is that - in this
> system - a UNIQUE index on the parent doesn't actually guarantee
> uniqueness across the whole partitioning hierarchy unless it so
> happens that the index columns or expressions are the same as the
> partitioning columns or expressions. That's a little a
> counterintuitive, and people have already been complaining that a
> partitioned table + partitions doesn't look enough like a plain table.
> However, I'm not sure there's a better alternative, because somebody
> might want partition-wise unique indexes even though that doesn't
> guarantee global uniqueness. So I think if someday we have global
> indexes, then we can plan to use some other syntax for that, like
> CREATE GLOBAL [ UNIQUE ] INDEX.

Yes, I absolutely agree with your message that cross-partition
uniqueness is guaranteed through global index on partitioned table apart
from the case when the index key are the same as partitioning key (or
index comprises partitioning key in general).

Thanks for your comment. I'll try to propose the first patches as soon
as possible.

--
Maksim Milyutin
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2017-03-02 11:22:55 Re: [pgsql-www] Small issue in online devel documentation build
Previous Message Robert Haas 2017-03-02 11:08:47 Re: [PATCH] SortSupport for macaddr type