From: Arseny Sher <a.sher@postgrespro.ru>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Arseny Sher <a.sher@postgrespro.ru>
Cc: pgsql-hackers\@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Subject: Re: Indexes on partitioned tables and foreign partitions
Date: Wed, 09 May 2018 18:48:37 +0300
Message-ID: <87po24de3u.fsf@ars-thinkpad> (raw)
In-Reply-To: <CANP8+jJLyg1zMJ9iUXi0_A-CBOYpEztY_QV=DM1xNR6mfM+MOw@mail.gmail.com>
References: <87sh71cakz.fsf@ars-thinkpad>
<CANP8+j+L5W22kuiMMwtjhanqMMos_eRfuE=K6V4Krw_hgpgEcA@mail.gmail.com>
<87r2mkdhwl.fsf@ars-thinkpad>
<CANP8+jJLyg1zMJ9iUXi0_A-CBOYpEztY_QV=DM1xNR6mfM+MOw@mail.gmail.com>
Simon Riggs <simon@2ndquadrant.com> writes:
> Indexes on foreign tables cause an ERROR, so yes, we already just
> don't create them.
>
> You're suggesting silently skipping the ERROR. I can't see a reason for that.
Truly, I was inaccurate. I mean that index propagation is a nice feature,
and making it available for mix of foreign and local partitions skipping
the foreign ones is useful thing for users who understand the
consequences (of course there should be a warning in the docs -- my
patch was just an illustration of the idea). As I said, FDW-based
sharding often involves mix of foreign and local partitions, even in
simple manual forms. Imagine that you have a table which is too big to
fit into one server, so you partition it and move some partiitons to
another machine; you still would like to access the whole table to avoid
manual tuple routing. Or, you partition table by timestamps and keep
recent data on fast primary server, gradually moving old partitions to
another box. Again, it would be nice to access table as a whole to
e.g. calculate some analytics.
Anyway, given other opinions, I assume that the community has chosen
more conservative approach. Indeed, we can't guarantee uniqueness this
way; that's fully users responsiblity.
--
Arseny Sher
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
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: a.sher@postgrespro.ru, simon@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Indexes on partitioned tables and foreign partitions
In-Reply-To: <87po24de3u.fsf@ars-thinkpad>
* 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