Re: [HACKERS] Proposal: Local indexes for partitioned table - Mailing list pgsql-hackers

From Maksim Milyutin
Subject Re: [HACKERS] Proposal: Local indexes for partitioned table
Date
Msg-id b97b345b-3cae-3c96-980d-a4e989c3f634@postgrespro.ru
Whole thread Raw
In response to Re: [HACKERS] Proposal: Local indexes for partitioned table  (Robert Haas <robertmhaas@gmail.com>)
List 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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] [PATCH] SortSupport for macaddr type
Next
From: Fabien COELHO
Date:
Subject: Re: [pgsql-www] [HACKERS] Small issue in online devel documentationbuild