Stop including utils/relcache.h in access/genam.h, and stop including
htup_details.h in nodes/tidbitmap.h.  Both these files (genam.h and
tidbitmap.h) are widely used in other header files, so it's in our best
interest that they remain as lean as reasonable.
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/
202509291356.o5t6ny2hoa3q@alvherre.pgsql
 
 #include "utils/fmgrprotos.h"
 #include "utils/sortsupport.h"
 #include "utils/varbit.h"
+#include "varatt.h"
 
 /* GiST support functions */
 PG_FUNCTION_INFO_V1(gbt_bit_compress);
 
 
 #include <limits.h>
 
+#include "access/htup_details.h"
 #include "common/hashfn.h"
 #include "common/int.h"
 #include "nodes/bitmapset.h"
 
 #include "catalog/pg_type.h"
 #include "utils/fmgrprotos.h"
 #include "utils/inet.h"
+#include "varatt.h"
 
 
 static int inet_spg_node_number(const inet *val, int commonbits);
 
 #include "access/cmptype.h"
 #include "access/genam.h"
 #include "access/stratnum.h"
+#include "nodes/nodes.h"
+#include "nodes/pg_list.h"
 
 /*
  * We don't wish to include planner header files here, since most of an index
 
 #include "nodes/tidbitmap.h"
 #include "storage/buf.h"
 #include "storage/lockdefs.h"
-#include "utils/relcache.h"
 #include "utils/snapshot.h"
 
 /* We don't want this file to depend on execnodes.h. */
 typedef struct IndexInfo IndexInfo;
 typedef struct TupleTableSlot TupleTableSlot;
 
+/* or relcache.h */
+typedef struct RelationData *Relation;
+
 
 /*
  * Struct for statistics maintained by amgettuple and amgetbitmap
 
 #include "catalog/pg_index.h"
 #include "lib/stringinfo.h"
 #include "storage/bufmgr.h"
+#include "storage/dsm.h"
 #include "storage/shm_toc.h"
 #include "utils/skipsupport.h"
 
 
 #ifndef TIDBITMAP_H
 #define TIDBITMAP_H
 
-#include "access/htup_details.h"
 #include "storage/itemptr.h"
 #include "utils/dsa.h"