Re: Indexes on partitioned tables and foreign partitions

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, 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 14:28:16
Message-ID: CA+TgmoaH5K5W1V+FbtwJNY-YjBeZchgbKK8VpFtbGr649T-RRg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 9, 2018 at 10:20 PM, Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> But it seems I've misinterpreted what he was saying. He doesn't seem to
> be saying anything about how or whether we enforce the unique constraint
> on foreign tables. Only that if someone creates a constraint index on the
> partitioned table, all partitions *including* foreign partitions, must get
> a copy.

Honestly, I hadn't quite gotten that far in my thinking. That's a
really useful distinction, and I completely agree with it.

> So for now, we give users an error if they try to create an index on a
> partitioned table with a mix of local and foreign partitions. Once we
> figure out how to allow creating indexes (constraint-enforcing or not) on
> foreign tables, we can then think of relaxing that restriction.

Yeah, that sounds exactly right.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-05-10 14:49:31 Re: Should we add GUCs to allow partition pruning to be disabled?
Previous Message Robert Haas 2018-05-10 14:22:43 Re: Should we add GUCs to allow partition pruning to be disabled?