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 1odHXZ-0005p2-5r for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Sep 2022 20:50:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1odHXX-0008HZ-Nj for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Sep 2022 20:50:51 +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 1odHXX-0008Fw-EB for pgsql-hackers@lists.postgresql.org; Tue, 27 Sep 2022 20:50:51 +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 1odHXV-00072q-7k for pgsql-hackers@lists.postgresql.org; Tue, 27 Sep 2022 20:50:50 +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 28RKolpH3837431; Tue, 27 Sep 2022 16:50:47 -0400 From: Tom Lane To: Robert Haas cc: pgsql-hackers@lists.postgresql.org, Justin Pryzby , Dilip Kumar Subject: Re: longfin and tamandua aren't too happy but I'm not sure why In-reply-to: <3825454.1664310917@sss.pgh.pa.us> References: <20220927200712.GH6256@telsasoft.com> <3825454.1664310917@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 27 Sep 2022 16:35:17 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3837429.1664311847.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 27 Sep 2022 16:50:47 -0400 Message-ID: <3837430.1664311847@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > * frame #0: 0x000000010a36af8c postgres`ParseCommitRecord(info=3D'\x80= ', xlrec=3D0x00007fa0678a8090, parsed=3D0x00007ff7b5c50e78) at xactdesc.c:= 102:30 Okay, so the problem is this: by widening RelFileNumber to 64 bits, you have increased the alignment requirement of struct RelFileLocator, and thereby also SharedInvalidationMessage, to 8 bytes where it had been 4. longfin's alignment check is therefore expecting that xl_xact_twophase will likewise be 8-byte-aligned, but it isn't: (lldb) p data (char *) $0 =3D 0x00007fa06783a0a4 "\U00000001" I'm not sure whether the code that generates commit WAL records is breaking a contract it should maintain, or xactdesc.c needs to be taught to not assume that this data is adequately aligned. There is a second problem that I am going to hold your feet to the fire about: (lldb) p sizeof(SharedInvalidationMessage) (unsigned long) $1 =3D 24 We have sweated a good deal for a long time to keep that struct to 16 bytes. I do not think 50% bloat is acceptable. regards, tom lane