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 1nXcfC-0000mU-LM for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Mar 2022 05:39:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nXcfB-0002WV-E4 for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Mar 2022 05:39:05 +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 1nXcfB-0002WM-4v for pgsql-hackers@lists.postgresql.org; Fri, 25 Mar 2022 05:39:05 +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 1nXcf8-0005Hb-Uw for pgsql-hackers@postgresql.org; Fri, 25 Mar 2022 05:39:04 +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 22P5cjNT3193653; Fri, 25 Mar 2022 01:38:45 -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: <20220325052654.3xpbmntatyofau2w@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> <20220325052654.3xpbmntatyofau2w@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 24 Mar 2022 22:26:54 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3193651.1648186725.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 25 Mar 2022 01:38:45 -0400 Message-ID: <3193652.1648186725@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > Ah, and that's finally also the explanation why I couldn't reproduce the > failure it in a different directory, with an otherwise identically confi= gured > PG: The length of the path to the tablespace influences the size of the > XLOG_TBLSPC_CREATE record. Ooooohhh ... yeah, that could explain a lot of cross-animal variation. > Not sure what to do here... I guess we can just change the value we over= write > the page with and hope to not hit this again? But that feels deeply deep= ly > unsatisfying. AFAICS, this strategy of whacking a predetermined chunk of the page with a predetermined value is going to fail 1-out-of-64K times. We have to change the test so that it's guaranteed to produce an invalid checksum. Inverting just the checksum field, without doing anything else, would do that ... but that feels pretty unsatisfying too. regards, tom lane