Re: REINDEX CONCURRENTLY 2.0
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: "Shinoda, Noriyoshi (PN Japan A&PS Delivery)"
<noriyoshi.shinoda@hpe.com>, Michael Paquier <michael@paquier.xyz>
Cc: Sergei Kornilov <sk@zsrv.org>,
"pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2019-03-30T10:56:27Z
Lists: pgsql-hackers
Attachments
- 0001-Fix-REINDEX-CONCURRENTLY-of-partitions.patch (text/plain) patch 0001
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
Commits
-
Prevent reindex of invalid indexes on TOAST tables
- 8bca5f93547c 12.3 landed
- 61d7c7bce368 13.0 landed
-
Rework handling of invalid indexes with REINDEX CONCURRENTLY
- a6dcf9df4d91 12.0 landed
-
Split builtins.h to a new header ruleutils.h
- 7b1c2a0f2066 9.5.0 cited