Re: pg_index.indisreplident and invalid indexes

2020-08-28 Thread Michael Paquier
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 t

Re: pg_index.indisreplident and invalid indexes

2020-08-28 Thread Dmitry Dolgov
> 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

pg_index.indisreplident and invalid indexes

2020-08-26 Thread Michael Paquier
Hi all, While digging into a different patch involving DROP INDEX CONCURRENTLY and replica indexes, I have found that the handling of indisreplident is inconsistent for invalid indexes: https://www.postgresql.org/message-id/20200827022835.gm2...@paquier.xyz In short, imagine the following sequenc