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 1nlku7-0005eA-96 for pgsql-hackers@arkaria.postgresql.org; Tue, 03 May 2022 05:16:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nlku5-0005My-Ny for pgsql-hackers@arkaria.postgresql.org; Tue, 03 May 2022 05:16:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nlku5-0005Fw-Dw for pgsql-hackers@lists.postgresql.org; Tue, 03 May 2022 05:16:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nlku3-0005vK-9P for pgsql-hackers@postgresql.org; Tue, 03 May 2022 05:16:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2435GkB71959497; Tue, 3 May 2022 01:16:46 -0400 From: Tom Lane To: Andres Freund cc: Robert Haas , pgsql-hackers@postgresql.org, Thomas Munro Subject: Re: failures in t/031_recovery_conflict.pl on CI In-reply-to: <20220503040557.eimbfibv4rsey3s5@alap3.anarazel.de> References: <20220409231002.mddrr7mtca7p55v5@alap3.anarazel.de> <20220409233107.v7okovwr46xsizfk@alap3.anarazel.de> <5111.1649547266@sss.pgh.pa.us> <20220412184913.3wrt4olkdiqvicsj@alap3.anarazel.de> <907760.1649790322@sss.pgh.pa.us> <20220413002626.udl7lll7f3o7nre7@alap3.anarazel.de> <20220429200809.uuuseakmhb57sppk@alap3.anarazel.de> <465685.1651274819@sss.pgh.pa.us> <20220503014803.uknu3cwahwhbgrak@alap3.anarazel.de> <1929823.1651549472@sss.pgh.pa.us> <20220503040557.eimbfibv4rsey3s5@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 02 May 2022 21:05:57 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1959495.1651555006.1@sss.pgh.pa.us> Date: Tue, 03 May 2022 01:16:46 -0400 Message-ID: <1959496.1651555006@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2022-05-02 23:44:32 -0400, Tom Lane wrote: >> I can poke into that tomorrow, but are you sure that that isn't an >> expectable result? > It's not expected. But I think I might see what the problem is: > We wait for the FETCH (and thus the buffer pin to be acquired). But that > doesn't guarantee that the lock has been acquired. We can't check that with > pump_until() afaics, because there'll not be any output. But a query_until() > checking pg_locks should do the trick? Irritatingly, it doesn't reproduce (at least not easily) in a manual build on the same box. So it's almost surely a timing issue, and your theory here seems plausible. regards, tom lane