Re: Indexes on partitioned tables and foreign partitions

From: Arseny Sher <a(dot)sher(at)postgrespro(dot)ru>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: 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-09 14:26:34
Message-ID: 87r2mkdhwl.fsf@ars-thinkpad
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Simon Riggs <simon(at)2ndquadrant(dot)com> writes:

> How much sense is it to have a partitioned table with a mix of local
> and foreign tables?

Well, as much sense as fdw-based sharding has, for instance. It is
arguable, but it exists.

> Shouldn't the fix be to allow creation of indexes on foreign tables?
> (Maybe they would be virtual or foreign indexes??)

Similar ideas were discussed at [1]. There was no wide consensus of even
what problems such feature would solve. Since currently indexes on
foreign tables are just forbidden, it seems to me that the best what
partitioning code can do today is just not creating them.

[1] https://www.postgresql.org/message-id/flat/4F62FD69(dot)2060007%40lab(dot)ntt(dot)co(dot)jp#4F62FD69(dot)2060007(at)lab(dot)ntt(dot)co(dot)jp

--
Arseny Sher
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-05-09 14:30:53 Re: [HACKERS] path toward faster partition pruning
Previous Message Alvaro Herrera 2018-05-09 13:43:33 Re: [HACKERS] path toward faster partition pruning