Re: REINDEX CONCURRENTLY 2.0 - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: REINDEX CONCURRENTLY 2.0
Date
Msg-id ec449ece-5e7f-f1f2-6e6c-81e305e9af81@2ndquadrant.com
Whole thread Raw
In response to RE: REINDEX CONCURRENTLY 2.0  ("Shinoda, Noriyoshi (PN Japan A&PS Delivery)"<noriyoshi.shinoda@hpe.com>)
Responses Re: REINDEX CONCURRENTLY 2.0
Re: REINDEX CONCURRENTLY 2.0
List pgsql-hackers
On 2019-03-29 16:10, Shinoda, Noriyoshi (PN Japan A&PS Delivery) wrote:
> postgres=> CREATE TABLE part1(c1 INT) PARTITION BY RANGE(c1);
> CREATE TABLE
> postgres=> CREATE TABLE part1v1 PARTITION OF part1 FOR VALUES FROM (0) TO (100);
> CREATE TABLE
> postgres=> CREATE INDEX idx1_part1 ON part1(c1);
> CREATE INDEX
> postgres=> REINDEX TABLE CONCURRENTLY part1v1;
> ERROR:  cannot drop index part1v1_c1_idx_ccold because index idx1_part1 requires it
> HINT:  You can drop index idx1_part1 instead.

The attached patch fixes this.  The issue was that we didn't move all
dependencies from the index (only in the other direction).  Maybe that
was sufficient when the patch was originally written, before partitioned
indexes.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: "Fred .Flintstone"
Date:
Subject: Re: PostgreSQL pollutes the file system
Next
From: Peter Eisentraut
Date:
Subject: Re: PostgreSQL pollutes the file system