Re: longfin and tamandua aren't too happy but I'm not sure why

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Subject: Re: longfin and tamandua aren't too happy but I'm not sure why
Date: 2022-09-27 20:50:47
Message-ID: 3837430.1664311847@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-09-27 21:21:54 Re: longfin and tamandua aren't too happy but I'm not sure why
Previous Message Tom Lane 2022-09-27 20:35:17 Re: longfin and tamandua aren't too happy but I'm not sure why