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

From Andres Freund
Subject Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY
Date
Msg-id 20220524183705.cmgbqq32z63qynhe@alap3.anarazel.de
Whole thread Raw
In response to Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
Hi,

On 2022-05-24 11:15:42 -0700, Andres Freund 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.

Looking at it more, I don't see when PROC_IN_SAFE_IC is safe as defined,
tbh. Afaict it basically completely breaks snapshots - which we rely on to
work for both the initial build scan and then for the validation scan.

It seems safe to make CIC to ignore other CICs when deciding whether to wait
for those transactions. But it seems utterly unsafe to ignore CICs when when
determining horizons.

Greetings,

Andres Freund



pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY
Next
From: Andrey Borodin
Date:
Subject: Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY