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: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, 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-31 15:30:51
Message-ID: 202205311530.yrxaulmj4d7y@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2022-May-28, Andrey Borodin wrote:

> And reverting d9d0762 does not fix the issue. I'm not sure if I'm observing some other problem here.
>
> v4 of a test not use pg_sleep() and fails with regular amcheck
> failure. Reverting d9d0762 fixes the test. Unless I execute the test
> for 1 million transactions, then it fail even with a revert...
>
> I suspect that v3 and v4 triggers different problems.

Hmm, the only failure I see with v4 is a deadlock of this sort:

2022-05-31 17:26:13.400 CEST [130375] 004_rc.pl ERROR: deadlock detected
2022-05-31 17:26:13.400 CEST [130375] 004_rc.pl DETAIL: Process 130375 waits for ShareLock on transaction 36108; blocked by process 130372.
Process 130372 waits for ShareLock on transaction 36107; blocked by process 130375.
Process 130375: INSERT INTO tbl VALUES(random()*1000,0,0,0,now())
on conflict(i) do update set updated_at = now();
Process 130372: INSERT INTO tbl VALUES(random()*1000,0,0,0,now())
on conflict(i) do update set updated_at = now();

which is of course not very interesting.

--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
<Schwern> It does it in a really, really complicated way
<crab> why does it need to be complicated?
<Schwern> Because it's MakeMaker.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrey Borodin 2022-05-31 17:12:33 Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY
Previous Message Nathan Bossart 2022-05-31 15:28:55 Re: Extension pg_trgm, permissions and pg_dump order