public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Andres Freund <[email protected]>
Cc: Andreas Karlsson <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: Our ABI diff infrastructure ignores enum SysCacheIdentifier
Date: Wed, 8 Apr 2026 11:28:13 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <l2nw7a55equak3kh2wbjfrllcfrgltwkex6zvjqylxupooadnf@3uf2ey6rbwxz>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<vlcexdcimsmvu3aplt2yxpfndkgtuvjsrms2fdl46rbw3k2kug@drspkoxlaije>
<[email protected]>
<l2nw7a55equak3kh2wbjfrllcfrgltwkex6zvjqylxupooadnf@3uf2ey6rbwxz>
On Sun, Apr 05, 2026 at 10:09:48PM -0400, Andres Freund wrote:
>> The trick in genbki.pl was needed to avoid some noise due to -Wenum-compare
>> in a couple of files.
>
> You mean the include guards? Seems they should be added regardless of
> anything else.
They would be needed with this patch. Now we don't need them as
syscache.h is the only location where syscache_ids.h is pulled in.
> ISTM a better direction would be to make MAKE_SYSCACHE(name,idxname,nbuckets)
> declare something like
> extern SysCache name;
>
> where SysCache is a forward declared struct type with the definition private
> to a C file or an internals header.
>
> And then have genbki emit definitions of those that gets included into a C
> file. That struct can then have all the necessary spce to avoid having to
> having to allocate as much and perhaps even get some of the metadata specified
> at compile time, so it doesn't have to be redone in every backend.
Perhaps. not for v19 for sure.
>> Would you prefer a different option? That would protect from large
>> rebuilds should syscache.h be touched in some way. A different option
>> would be to move get_object_catcache_oid() and
>> get_object_catcache_name() out of objectaddress.h to a different
>> header, limiting the scope of what's pulled in objectaddress.h.
>
> I frankly would just make those return an integer.
Not sure about that. We know what we are getting by calling this API
with the type defined, at least.
>> Anyway, the attached should take care of your main concern, I guess?
>
> It'd be better than today. I don't like the syscache ids being known
> everywhere, but it's better than those being known as well as the rest of
> syscache.h.
Well, the main point being to be able to detect breakages more
carefully, I am still curious to see where this experiment will lead
us, so I'd be content to leave the code as-is on HEAD, adjusting
things based on what I have sent in my previous email. If we are able
to detect one problem, at least, that would be a win for me, and the
solution of HEAD is much better than creating fake routines to tell
ABI detection libraries about the existence of the enum, at least
that's my take.
If others have any comments and/or opinions, feel free of course.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, 2-signature.asc)
download
view thread (6+ messages) latest in thread
reply
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Our ABI diff infrastructure ignores enum SysCacheIdentifier
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox