Re: pg_index.indisreplident and invalid indexes - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: pg_index.indisreplident and invalid indexes
Date
Msg-id 20200828082136.GA1363@paquier.xyz
Whole thread Raw
In response to Re: pg_index.indisreplident and invalid indexes  (Dmitry Dolgov <9erthalion6@gmail.com>)
List pgsql-hackers
On Fri, Aug 28, 2020 at 10:15:37AM +0200, Dmitry Dolgov wrote:
> Thanks for the patch. It sounds right, so no objections from me. But I
> wonder if something similar has to be done also for
> index_concurrently_swap function?

As of index.c, this already happens:
    /* Preserve indisreplident in the new index */
    newIndexForm->indisreplident = oldIndexForm->indisreplident;
    oldIndexForm->indisreplident = false;

In short, the new concurrent index is created first with
indisreplident = false, and when swapping the old and new indexes, the
new index inherits the setting of the old one, and the old one planned
for drop uses indisreplident = false when swapping.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: pg_index.indisreplident and invalid indexes
Next
From: John Naylor
Date:
Subject: Re: Deprecating postfix and factorial operators in PostgreSQL 13