Re: pg_index.indisreplident and invalid indexes

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_index.indisreplident and invalid indexes
Date: 2020-08-28 08:21:36
Message-ID: 20200828082136.GA1363@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2020-08-28 08:24:40 Re: Deprecating postfix and factorial operators in PostgreSQL 13
Previous Message Dmitry Dolgov 2020-08-28 08:15:37 Re: pg_index.indisreplident and invalid indexes