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 1nXcQ0-0008Nl-Jj for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Mar 2022 05:23:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nXcPz-00076N-FL for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Mar 2022 05:23:23 +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 1nXcPz-0006vj-8r for pgsql-hackers@lists.postgresql.org; Fri, 25 Mar 2022 05:23:23 +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 1nXcPx-000723-2g for pgsql-hackers@postgresql.org; Fri, 25 Mar 2022 05:23:22 +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 22P5N0id3192027; Fri, 25 Mar 2022 01:23:00 -0400 From: Tom Lane To: Andres Freund cc: Robert Haas , Daniel Gustafsson , Kyotaro Horiguchi , deniel1495@mail.ru, Ibrar Ahmed , tejeswarm@hotmail.com, hlinnaka , Masahiko Sawada , "pgsql-hackers@postgresql.org" , Daniel Wood Subject: Re: Corruption during WAL replay In-reply-to: <20220325045438.enwakjqhrafzq5f2@alap3.anarazel.de> References: <3167047.1648169107@sss.pgh.pa.us> <3170060.1648171358@sss.pgh.pa.us> <3173721.1648173548@sss.pgh.pa.us> <20220325022010.iqdj37tjqrqwxfrh@alap3.anarazel.de> <20220325024302.lhhi7jaapyetqviv@alap3.anarazel.de> <20220325034301.htu27xf54xjgyoca@alap3.anarazel.de> <3185871.1648181300@sss.pgh.pa.us> <20220325045438.enwakjqhrafzq5f2@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 24 Mar 2022 21:54:38 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3192025.1648185780.1@sss.pgh.pa.us> Date: Fri, 25 Mar 2022 01:23:00 -0400 Message-ID: <3192026.1648185780@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > I do see that the LSN that ends up on the page is the same across a few runs > of the test on serinus. Which presumably differs between different > animals. Surprised that it's this predictable - but I guess the run is short > enough that there's no variation due to autovacuum, checkpoints etc. Uh-huh. I'm not surprised that it's repeatable on a given animal. What remains to be explained: 1. Why'd it start failing now? I'm guessing that ce95c5437 *was* the culprit after all, by slightly changing the amount of catalog data written during initdb, and thus moving the initial LSN. 2. Why just these two animals? If initial LSN is the critical thing, then the results of "locale -a" would affect it, so platform dependence is hardly surprising ... but I'd have thought that all the animals on that host would use the same initial set of collations. OTOH, I see petalura and pogona just fell over too. Do you have some of those animals --with-icu and others not? > 16bit checksums for the win. Yay :-( As for a fix, would damaging more of the page help? I guess it'd just move around the one-in-64K chance of failure. Maybe we have to intentionally corrupt (e.g. invert) the checksum field specifically. regards, tom lane