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 1pf475-0008Vl-P8 for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Mar 2023 19:27:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pf474-0007PT-JU for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Mar 2023 19:27:10 +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 1pf474-0007PK-AE for pgsql-hackers@lists.postgresql.org; Wed, 22 Mar 2023 19:27:10 +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 1pf471-0008TJ-Vo for pgsql-hackers@postgresql.org; Wed, 22 Mar 2023 19:27:09 +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 32MJR1Pd1650746; Wed, 22 Mar 2023 15:27:01 -0400 From: Tom Lane To: Robert Haas cc: Aleksander Alekseev , PostgreSQL Hackers , Himanshu Upadhyaya , Mark Dilger , Andres Freund Subject: Re: HOT chain validation in verify_heapam() In-reply-to: References: <20221109220803.t25sosmfvkeglhy4@awork3.anarazel.de> <20221202001321.igy24zwq7myyfi4o@awork3.anarazel.de> Comments: In-reply-to Robert Haas message dated "Wed, 22 Mar 2023 09:19:18 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1650744.1679513221.1@sss.pgh.pa.us> Date: Wed, 22 Mar 2023 15:27:01 -0400 Message-ID: <1650745.1679513221@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > I have committed this after tidying up a bunch of things in the test > case file that I found too difficult to understand -- or in some cases > just incorrect, like: My animal mamba doesn't like this one bit. I suspect the reason is that it's big-endian (PPC) and the endianness hacking in the test is simply wrong: syswrite($file, pack("L", $ENDIANNESS eq 'little' ? 0x00010019 : 0x19000100)) or BAIL_OUT("syswrite failed: $!"); pack's L code should already be performing an endianness swap, so why are we doing another one in the argument? regards, tom lane