From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Maksim Milyutin <milyutinma(at)gmail(dot)com> |
Subject: | Re: [HACKERS] Proposal: Local indexes for partitioned table |
Date: | 2018-01-05 21:57:33 |
Message-ID: | 803ac362-d8ef-ba67-daf5-b3263718070b@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 1/4/18 23:08, David Rowley wrote:
> On 5 January 2018 at 11:01, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>> (The more I think of this, the more I believe that pg_inherits is a
>> better answer. Opinions?)
>
> I admit to not having had a chance to look at any code with this yet,
> but I'm just thinking about a case like the following.
>
> CREATE TABLE part (a INT, b INT) PARTITION BY RANGE (a);
> CREATE TABLE part_a1 PARTITION OF part FOR VALUES FROM (0) TO (10)
> PARTITION BY RANGE (b);
> CREATE TABLE part_a1_b1 PARTITION OF part_a1 FOR VALUES FROM (0) TO (10);
>
> CREATE INDEX ON part_a1 (a); -- sub-partition index (creates index on
> part_a1_b1)
>
> CREATE INDEX ON part (a); -- What do we do here?
>
> Should we:
>
> 1. Create another identical index on part_a1_b1; or
> 2. Allow the existing index on part_a1_b1 to have multiple parents; or
> 3. ERROR... (probably not)
4. It should adopt part_a1 and its subindexes into its hierarchy. That
shouldn't be a problem under the current theory, should it?
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2018-01-05 21:58:39 | Invalid pg_upgrade error message during live check |
Previous Message | Jeff Janes | 2018-01-05 21:34:40 | Re: [HACKERS] Removing useless DISTINCT clauses |