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

Петър Славов <pet.slavov@gmail.com>

From: Петър Славов <pet.slavov@gmail.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Peter Geoghegan <pg@bowt.ie>, Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Andres Freund <andres@anarazel.de>, Andrey Borodin <x4mmm@yandex-team.ru>, Michael Paquier <michael@paquier.xyz>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2022-05-26T05:29:11Z
Lists: pgsql-bugs
On Thu, May 26, 2022 at 6:17 AM Bruce Momjian <bruce@momjian.us> wrote:

> What do we currently know?
>
> *  Caused by CREATE/REINDEX CONCURRENTLY
> *  No way to detect which indexes were created concurrently
> *  amcheck will be required to find corrupt indexes (options?)
>
Actually in the initial bug report I posted an SQL that is testing
sequential scan VS index scan to find the missing records in the index.
This is how we initially found the problem.
I am not sure how these missing records are related to the `amcheck`
problems because the `ctid`s does not match exactly.


> --
>   Bruce Momjian  <bruce@momjian.us>        https://momjian.us
>   EDB                                      https://enterprisedb.com
>
>   Indecision is a decision.  Inaction is an action.  Mark Batterson
>
>

Commits

  1. Revert changes to CONCURRENTLY that "sped up" Xmin advance

  2. Fix possible HOT corruption when RECENTLY_DEAD changes to DEAD while pruning.