Reduce presence of syscache.h in src/include/

Michael Paquier <michael@paquier.xyz>

Commit: e0fa5bd146564d9d05cac15bdcba65b7860d2b91
Author: Michael Paquier <michael@paquier.xyz>
Date: 2026-04-08T23:49:36Z
Reduce presence of syscache.h in src/include/

ee642cccc43c has added syscache.h in inval.h and objectaddress.h,
enlarging by a lot the footprint of this header, particularly via
objectaddress.h.  A change in syscache.h would cause a lot more files to
be recompiled.

This commit reduces the presence of syscache.h by switching to a direct
use of syscache_ids.h in inval.h and objectaddress.h, where the enum
SysCacheIdentifier is defined.  genbki.pl gains an #ifndef block for
this header, so as its inclusion is more controlled.

Reported-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/vlcexdcimsmvu3aplt2yxpfndkgtuvjsrms2fdl46rbw3k2kug@drspkoxlaije

Files

PathChange+/−
src/backend/catalog/genbki.pl modified +8 −2
src/include/catalog/objectaddress.h modified +1 −1
src/include/utils/inval.h modified +1 −1

Discussion