From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org, Justin Pryzby <pryzby@telsasoft.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Subject: Re: longfin and tamandua aren't too happy but I'm not sure why
Date: Tue, 27 Sep 2022 16:50:47 -0400
Message-ID: <3837430.1664311847@sss.pgh.pa.us> (raw)
In-Reply-To: <3825454.1664310917@sss.pgh.pa.us>
References: <CA+TgmoYO5ee6EWhbxz+TE9hcSDONCJvczPNv--33Uk8Xd9tMHQ@mail.gmail.com>
<20220927200712.GH6256@telsasoft.com>
<3825454.1664310917@sss.pgh.pa.us>
I wrote:
> * frame #0: 0x000000010a36af8c postgres`ParseCommitRecord(info='\x80', xlrec=0x00007fa0678a8090, parsed=0x00007ff7b5c50e78) 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 = 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 = 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, pryzby@telsasoft.com, dilipbalaut@gmail.com
Subject: Re: longfin and tamandua aren't too happy but I'm not sure why
In-Reply-To: <3837430.1664311847@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox