Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY
Date
Msg-id Yowywr0MRo1hyYyx@paquier.xyz
Whole thread Raw
In response to Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY
List pgsql-bugs
On Mon, May 23, 2022 at 03:49:02PM +0500, Andrey Borodin wrote:
> I've transformed Peter's test into TAP test that runs ~20 seconds
> and reliably reproduces problem on my laptop.

Thanks for the TAP test.  That's nice.  It actually passes here,
reliably.

> And I observe that commenting out condition in following code fixes the test.
>             //if (!(statusFlags & PROC_IN_SAFE_IC))
>                 h->data_oldest_nonremovable =
>                     TransactionIdOlder(h->data_oldest_nonremovable, xmin);

Well, by doing so, I think that you are just making the CIC/REINDEX
wait again until the index is safe to use, but we want to skip this
wait as of the optimization done in d9d0762.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY
Next
From: Peter Geoghegan
Date:
Subject: Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY