Re: REINDEX CONCURRENTLY 2.0 - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: REINDEX CONCURRENTLY 2.0
Date
Msg-id 20190412031046.GD2144@paquier.xyz
Whole thread Raw
In response to Re: REINDEX CONCURRENTLY 2.0  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: REINDEX CONCURRENTLY 2.0
List pgsql-hackers
On Thu, Apr 11, 2019 at 09:49:47AM -0400, Alvaro Herrera wrote:
> Hmm, I suppose that makes sense for REINDEX TABLE or anything that
> reindexes more than one index, but if you do REINDEX INDEX surely it
> is reasonable to allow the case?

Yes, we could revisit the REINDEX INDEX portion of the decision, and
after sleeping on it my previous argument makes limited sense for
REINDEX processes using only one index.  One could note that the
header comment of ReindexRelationConcurrently() kind of implies the
same conclusion as you do, but that's perhaps just an accident.

So...  I am coming up with the patch attached.  I have introduced some
tests using a trick with CIC to have an invalid index to work on.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: "Jamison, Kirk"
Date:
Subject: Minor fix in reloptions.c comments
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Attempt to consolidate reading of XLOG page