Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nw3u5-0005zG-JV for pgsql-bugs@arkaria.postgresql.org; Tue, 31 May 2022 15:35:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nw3u4-0005i0-Bb for pgsql-bugs@arkaria.postgresql.org; Tue, 31 May 2022 15:35:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nw3u4-0005hr-3U for pgsql-bugs@lists.postgresql.org; Tue, 31 May 2022 15:35:28 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nw3u1-0001QT-BD for pgsql-bugs@lists.postgresql.org; Tue, 31 May 2022 15:35:27 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id C5B283200944; Tue, 31 May 2022 11:35:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 31 May 2022 11:35:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1654011321; x=1654097721; bh=U TkotXF0ENC2JV0mTwkfwL0Ot7oAn+e2bJ9QG8N/gVo=; b=uFrZfnjPhS37AYGR1 NA5NK4q1oH+M/LgzANNX8+TyNGQ0UNOEorLV6TpW2bIeGnfEMwv8oBvFoFAYkgk5 KQa1GWLo0cDZoIBhPOtlPjjV+5QaM5QF2FUQ1gzqwFG/6p+JFEoSU7GJMUbwTdgQ 9W11vFPBXIx8JLl04jcnEORyIW2yry5IKdm1Cqk2oluREkpO5JJejo0QzMaBH6LG f8fP2qtNFic6LUJKSlzGsi7q02lQQWfrhs0pTk1nlfyBVMjlpQzKeZSoT8oX8bks PlqFlBEDeBcWed/7X71riv+a0dDsD4klmVIJX7/bWQPuCX2PpIr9DyVwlnT7tQCO +fuKw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrkeekgdeltdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeejkeff gfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 31 May 2022 11:35:20 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id C39E02A0843; Tue, 31 May 2022 17:30:51 +0200 (CEST) Date: Tue, 31 May 2022 17:30:51 +0200 From: Alvaro Herrera To: Andrey Borodin Cc: Andres Freund , Robert Haas , Peter Geoghegan , Michael Paquier , =?utf-8?B?0J/QtdGC0YrRgCDQodC70LDQstC+0LI=?= , PostgreSQL mailing lists Subject: Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY Message-ID: <202205311530.yrxaulmj4d7y@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4B1BA5BF-37EC-4EE7-AB3B-4C4D95A8059A@yandex-team.ru> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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/ It does it in a really, really complicated way why does it need to be complicated? Because it's MakeMaker.