Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Peter Geoghegan <pg(at)bowt(dot)ie>, Michael Paquier <michael(at)paquier(dot)xyz>, Петър Славов <pet(dot)slavov(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY
Date: 2022-05-24 18:38:07
Message-ID: 04B2AE56-C737-4F1E-ABEF-F88DA2280C5D@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> On 24 May 2022, at 23:15, Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> With fsync=on, it's much harder to reproduce.
That exaplains why it's easier to reproduce on MacOS: it seem it ignores fsync.

> On 24 May 2022, at 23:15, Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> I suspect the problem might be related to pruning done during the validation
> scan. Once PROC_IN_SAFE_IC is set, the backend itself will not preserve tids
> its own snapshot might need. Which will wreak havoc during the validation
> scan.

I observe that removing PROC_IN_SAFE_IC for index_validate() fixes tests.
But why it's not a problem for index_build() scan?

And I do not understand why it's a problem that tuple is pruned during the scan... How does this "wreak havoc" happen?

Best regards, Andrey Borodin.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2022-05-24 18:46:54 Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY
Previous Message Andres Freund 2022-05-24 18:37:05 Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY