> On Thu, Aug 27, 2020 at 11:57:21AM +0900, Michael Paquier wrote: > > I think that this problem is similar to indisclustered, and that we > had better set indisreplident to false when clearing indisvalid for an > index concurrently dropped. This would prevent problems with ALTER > TABLE of course, but also the relcache. > > Any objections to the attached? I am not sure that this is worth a > backpatch as that's unlikely going to be a problem in the field, so > I'd like to fix this issue only on HEAD. This exists since 9.4 and > the introduction of replica identities.
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? /* * Mark the new index as valid, and the old index as invalid similarly to * what index_set_state_flags() does. */ newIndexForm->indisvalid = true; oldIndexForm->indisvalid = false; oldIndexForm->indisclustered = false;