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

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Петър Славов <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-31 09:19:01
Message-ID: 202205310919.ziwjdn5e36nt@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2022-May-31, Michael Paquier wrote:

> Yeah, the tricky part is how to parametize that to be cheap, still
> useful. Having a larger number of attributes makes the particular
> problem of this thread easier to hit because it enlarges the
> validation window in the concurrent build,

Hmm, I wonder if it's possible to use an index ON tab (pg_sleep(100ms))
or something like that (perhaps even use an expresion involving an
advisory lock acquisition, which is being held by the other session), to
widen the window.

The stop events patch that A. Korotkov posted [0] would likely be very
useful here.

[0] https://postgr.es/m/CAPpHfdtSEOHX8dSk9Qp+Z++i4BGQoffKip6JDWngEA+g7Z-XmQ@mail.gmail.com

> On my own laptop, the original test of the reporter takes up to 3~4s
> to reproduce the issue, for example, all the time, so that's good :)

Sadly, my laptop is somehow broken and I haven't reproduced the failure
even a single time, and my other regular computers are at high seas (I hope).

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Giorgio Saviane 2022-05-31 09:26:17 Re: BUG #17449: Disk space not released
Previous Message Alvaro Herrera 2022-05-31 08:53:45 Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY