From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org, Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: David Rowley <dgrowleyml@gmail.com>
Subject: Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size
Date: Wed, 22 Feb 2023 16:34:44 -0500
Message-ID: <295606.1677101684@sss.pgh.pa.us> (raw)
In-Reply-To: <1014296.1655422634@sss.pgh.pa.us>
References: <20220616233130.rparivafipt6doj3@alap3.anarazel.de>
<1014296.1655422634@sss.pgh.pa.us>
I wrote:
> Andres Freund <andres@anarazel.de> writes:
>> Maybe it's worth sticking a StaticAssert() for the struct size
>> somewhere.
> Indeed. I thought we had one already.
>> I'm a bit wary about that being too noisy, there are some machines with
>> odd alignment requirements. Perhaps worth restricting the assertion to
>> x86-64 + armv8 or such?
> I'd put it in first and only reconsider if it shows unfixable problems.
Now that we've got the sizeof(ExprEvalStep) under control, shouldn't
we do the attached?
regards, tom lane
Attachments:check-sizeof-ExprEvalStep.patch (text/x-diff, 506B) downloaddiff --git a/src/include/executor/execExpr.h b/src/include/executor/execExpr.hindex 86e1ac1e65..06c3adc0a1 100644--- a/src/include/executor/execExpr.h+++ b/src/include/executor/execExpr.h@@ -669,6 +669,10 @@ typedef struct ExprEvalStep
} d;
} ExprEvalStep;
+/* Enforce the size rule given in the comment above */+StaticAssertDecl(sizeof(ExprEvalStep) <= 64,+ "size of ExprEvalStep exceeds 64 bytes");+
/* Non-inline data for container operations */
typedef struct SubscriptingRefState
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, andres@anarazel.de, n.gluhov@postgrespro.ru, andrew@dunslane.net, dgrowleyml@gmail.com
Subject: Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size
In-Reply-To: <295606.1677101684@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