Re: [HACKERS] Proposal: Local indexes for partitioned table - Mailing list pgsql-hackers

From David Rowley
Subject Re: [HACKERS] Proposal: Local indexes for partitioned table
Date
Msg-id CAKJS1f_m-PbyOZg1H9Gtu4Eb=b7yrWPO-=TJCQhpLA8_a8qqSw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Proposal: Local indexes for partitioned table  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: [HACKERS] Proposal: Local indexes for partitioned table  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On 15 November 2017 at 01:09, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> if a
> partition exists which *doesn't* have the index, restoring things this
> way would create the index in that partition too, which is unwanted
> because the end state is different to what was in the dumped database.

hmm, but surely the all those indexes must already exist if the
partitioned index exists. Won't we be disallowing DROP INDEX of the
leaf partition indexes if that index is marked as being part of the
partitioned index?

If so, then surely this could only happen if someone manually edited
the pg_dump file to remove the CREATE INDEX statement for the leaf
partition, and if they do that, then maybe they won't be so surprised
that CREATE INDEX has to create some indexes.

-- David Rowley                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Proposal: Local indexes for partitioned table
Next
From: Magnus Hagander
Date:
Subject: Re: [HACKERS] Re: proposal - psql: possibility to specify sort fordescribe commands, when size is printed