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 1njVUu-0005tl-E1 for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Apr 2022 00:25:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1njVUt-0002SU-96 for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Apr 2022 00:25:35 +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 1njVUs-0002SL-Vs for pgsql-hackers@lists.postgresql.org; Wed, 27 Apr 2022 00:25:34 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njVUq-0000ZN-Iz for pgsql-hackers@lists.postgresql.org; Wed, 27 Apr 2022 00:25:34 +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 23R0PTkM287796; Tue, 26 Apr 2022 20:25:29 -0400 From: Tom Lane To: Thomas Munro cc: Michael Paquier , Noah Misch , Jeff Davis , Postgres hackers Subject: Re: pgsql: Add contrib/pg_walinspect. In-reply-to: References: <171769.1650950714@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Wed, 27 Apr 2022 12:06:30 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <287794.1651019129.1@sss.pgh.pa.us> Date: Tue, 26 Apr 2022 20:25:29 -0400 Message-ID: <287795.1651019129@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > I think it's a bug in pg_walinspect, so I'll move the discussion back > here. Here's one rather simple way to fix it, that has survived > running the test a thousand times (using a recipe that failed for me > quite soon, after 20-100 attempts or so; I never figured out how to > get the 50% failure rate reported by Tom). Not sure what we're doing differently, but plain "make check" in contrib/pg_walinspect fails pretty consistently for me on gcc23. I tried it again just now and got five failures in five attempts. I then installed your patch and got the same failure, three times out of three, so I don't think we're there yet. Again, since I do have this problem in captivity, I'm happy to spend some time poking at it. But I could use a little guidance where to poke, because I've not looked at any of the WAL prefetch stuff. regards, tom lane