Re: Our ABI diff infrastructure ignores enum SysCacheIdentifier
| От | Michael Paquier |
|---|---|
| Тема | Re: Our ABI diff infrastructure ignores enum SysCacheIdentifier |
| Дата | |
| Msg-id | adW9PfgAeq6hKUjU@paquier.xyz обсуждение |
| Ответ на | Re: Our ABI diff infrastructure ignores enum SysCacheIdentifier (Andres Freund <andres@anarazel.de>) |
| Ответы |
Re: Our ABI diff infrastructure ignores enum SysCacheIdentifier
|
| Список | pgsql-hackers |
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
Вложения
В списке pgsql-hackers по дате отправления: