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 1kVjKs-0005Ct-RX for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Oct 2020 22:45:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kVjKr-0002Po-Kd for pgsql-hackers@arkaria.postgresql.org; Thu, 22 Oct 2020 22:45:29 +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 1kVjKr-0002Ph-Dp for pgsql-hackers@lists.postgresql.org; Thu, 22 Oct 2020 22:45:29 +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 1kVjKp-0006Kj-6x for pgsql-hackers@postgresql.org; Thu, 22 Oct 2020 22:45:29 +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 09MMjFq3095052; Thu, 22 Oct 2020 18:45:15 -0400 From: Tom Lane To: Mark Dilger cc: Robert Haas , Peter Geoghegan , "Andrey M. Borodin" , Stephen Frost , Michael Paquier , Amul Sul , Dilip Kumar , Andres Freund , PostgreSQL-development Subject: Re: new heapcheck contrib module In-reply-to: References: <12ED3DA8-25F0-4B68-937D-D907CFBF08E7@enterprisedb.com> <20200420194210.sevnpi4lyghoanxi@alap3.anarazel.de> <23E60C3C-C20A-4508-84AC-E0CEA59E784A@enterprisedb.com> <5F743835-3399-419C-8324-2D424237E999@enterprisedb.com> <885D2EC9-7D06-4903-A17D-72C184A1E1C5@enterprisedb.com> <5CC85F28-F210-47AC-8DA8-EC4E82AF3FD5@enterprisedb.com> <0C0349EB-DD85-4DA8-82C7-DF70AB714592@enterprisedb.com> <9DF93B83-FE46-4EC4-A99D-77A60729FD2D@enterprisedb.com> <50F6468F-5A5E-412A-86EC-DF24B549D733@enterprisedb.com> <7D603B53-8078-4AF0-851B-803FF4416501@enterprisedb.com> <98265AA9-7BDC-4708-9348-CC1B173BBE1D@enterprisedb.com> <209783.1603313248@sss.pgh.pa.us> <77A60E99-6054-40FD-A5D6-769C287D4A0F@enterprisedb.com> <721BFA83-EA6F-463D-A9DF-CE78A318B73A@enterprisedb.com> <2A7DA1A8-C4AA-43DF-A985-3CA52F4DC775@enterprisedb.com> <43209.1 Comments: In-reply-to Mark Dilger message dated "Thu, 22 Oct 2020 14:18:59 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <95050.1603406715.1@sss.pgh.pa.us> Date: Thu, 22 Oct 2020 18:45:15 -0400 Message-ID: <95051.1603406715@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Mark Dilger writes: >> On Oct 22, 2020, at 2:06 PM, Tom Lane wrote: >> Oh, wait a second. ItemIdData has the flag bits in the middle: >> meaning that for that particular bit pattern, one endianness >> is going to see the flags as 01 (LP_NORMAL) and the other as 10 >> (LP_REDIRECT). > Well, the issue is that on big-endian machines it is not reporting any > corruption at all. Are you sure the difference will be LP_NORMAL vs > LP_REDIRECT? [ thinks a bit harder... ] Probably not. The byte/bit string looks the same either way, given that it's four repetitions of the same byte value. But which field is which will differ: we have either oooooooooooooooFFlllllllllllllll 01110111011101110111011101110111 or lllllllllllllllFFooooooooooooooo 01110111011101110111011101110111 So now I think this is a REDIRECT on either architecture, but the offset and length fields have different values, causing the redirect pointer to point to different places. Maybe it happens to point at a DEAD tuple in the big-endian case. regards, tom lane