From 9c227d8bffcde6c3c402ebe020f698e41c0fcd9f Mon Sep 17 00:00:00 2001
From: Andres Freund <andres@anarazel.de>
Date: Fri, 13 Mar 2026 11:44:04 -0400
Subject: [PATCH v2 17/17] don't include bitmapset.h in most nodes/*nodes.h
 headers

Not entirely sure this is worth it and, if so, whether we should rely on the
forward declaration in nodes.h.
---
 src/include/nodes/execnodes.h  | 1 +
 src/include/nodes/parsenodes.h | 6 +++++-
 src/include/nodes/plannodes.h  | 6 +++++-
 src/include/nodes/primnodes.h  | 6 +++++-
 4 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index 3dc616c1aeb..aadab6ab687 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -45,6 +45,7 @@
  * forward references in this file
  */
 typedef struct PlanState PlanState;
+typedef struct Bitmapset Bitmapset;
 typedef struct ExecRowMark ExecRowMark;
 typedef struct ExprState ExprState;
 typedef struct ExprContext ExprContext;
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index f3d32ef0188..50345cf8715 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -23,12 +23,16 @@
 #define PARSENODES_H
 
 #include "common/relpath.h"
-#include "nodes/bitmapset.h"
 #include "nodes/lockoptions.h"
 #include "nodes/primnodes.h"
 #include "nodes/value.h"
 #include "partitioning/partdefs.h"
 
+/*
+ * forward references in this file
+ */
+typedef struct Bitmapset Bitmapset;
+
 
 /* Possible sources of a Query */
 typedef enum QuerySource
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h
index b6185825fcb..905d1a5e3df 100644
--- a/src/include/nodes/plannodes.h
+++ b/src/include/nodes/plannodes.h
@@ -16,10 +16,14 @@
 
 #include "access/sdir.h"
 #include "access/stratnum.h"
-#include "nodes/bitmapset.h"
 #include "nodes/lockoptions.h"
 #include "nodes/primnodes.h"
 
+/*
+ * forward references in this file
+ */
+typedef struct Bitmapset Bitmapset;
+
 
 /* ----------------------------------------------------------------
  *						node definitions
diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h
index 384df50c80a..26c2518a242 100644
--- a/src/include/nodes/primnodes.h
+++ b/src/include/nodes/primnodes.h
@@ -19,10 +19,14 @@
 
 #include "access/attnum.h"
 #include "access/cmptype.h"
-#include "nodes/bitmapset.h"
 #include "nodes/lockoptions.h"
 #include "nodes/pg_list.h"
 
+/*
+ * forward references in this file
+ */
+typedef struct Bitmapset Bitmapset;
+
 
 typedef enum OverridingKind
 {
-- 
2.53.0.1.gb2826b52eb

