From: Maksim Milyutin <m.milyutin@postgrespro.ru>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Proposal: Local indexes for partitioned table
Date: Thu, 2 Mar 2017 14:09:24 +0300
Message-ID: <b97b345b-3cae-3c96-980d-a4e989c3f634@postgrespro.ru> (raw)
In-Reply-To: <CA+TgmoYu5qHs8ku0nNkmBeq8cfQwb5=-N3-aOggHNgo_D5q15Q@mail.gmail.com>
References: <c8fe4f6b-ff46-aae0-89e3-e936a35f0cfd@postgrespro.ru>
<CA+TgmoYu5qHs8ku0nNkmBeq8cfQwb5=-N3-aOggHNgo_D5q15Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: m.milyutin@postgrespro.ru, robertmhaas@gmail.com
Subject: Re: Proposal: Local indexes for partitioned table
In-Reply-To: <b97b345b-3cae-3c96-980d-a4e989c3f634@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox