summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorÁlvaro Herrera <alvherre@kurilemu.de>2025-09-25 14:45:08 +0200
committerÁlvaro Herrera <alvherre@kurilemu.de>2025-09-25 14:52:41 +0200
commit7e638d7f5093fd24837ebe709135fa16ef8e3e7b (patch)
tree31f6837aa40c045b715128bee1e58281ff006a8c /src
parent81fc3e28e383d9a21843a5ab845a1bd1a1042e12 (diff)
Don't include execnodes.h in replication/conflict.h
... which silently propagates a lot of headers into many places via pgstat.h, as evidenced by the variety of headers that this patch needs to add to seemingly random places. Add a minimum of typedefs to conflict.h to be able to remove execnodes.h, and fix the fallout. Backpatch to 18, where conflict.h first appeared. Discussion: https://postgr.es/m/202509191927.uj2ijwmho7nv@alvherre.pgsql
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/multixact.c1
-rw-r--r--src/backend/access/transam/xlogrecovery.c1
-rw-r--r--src/backend/storage/ipc/waiteventset.c1
-rw-r--r--src/backend/utils/activity/pgstat_backend.c1
-rw-r--r--src/include/pgstat.h1
-rw-r--r--src/include/replication/conflict.h9
6 files changed, 13 insertions, 1 deletions
diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c
index 8bf59d369f8..9d5f130af7e 100644
--- a/src/backend/access/transam/multixact.c
+++ b/src/backend/access/transam/multixact.c
@@ -79,6 +79,7 @@
#include "pg_trace.h"
#include "pgstat.h"
#include "postmaster/autovacuum.h"
+#include "storage/condition_variable.h"
#include "storage/pmsignal.h"
#include "storage/proc.h"
#include "storage/procarray.h"
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index 346319338a0..52ff4d119e6 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -45,6 +45,7 @@
#include "commands/tablespace.h"
#include "common/file_utils.h"
#include "miscadmin.h"
+#include "nodes/miscnodes.h"
#include "pgstat.h"
#include "postmaster/bgwriter.h"
#include "postmaster/startup.h"
diff --git a/src/backend/storage/ipc/waiteventset.c b/src/backend/storage/ipc/waiteventset.c
index 7c0e66900f9..b0746521ae4 100644
--- a/src/backend/storage/ipc/waiteventset.c
+++ b/src/backend/storage/ipc/waiteventset.c
@@ -67,6 +67,7 @@
#include "libpq/pqsignal.h"
#include "miscadmin.h"
#include "pgstat.h"
+#include "port/atomics.h"
#include "portability/instr_time.h"
#include "postmaster/postmaster.h"
#include "storage/fd.h"
diff --git a/src/backend/utils/activity/pgstat_backend.c b/src/backend/utils/activity/pgstat_backend.c
index 07a1116671b..a864ae8e6a6 100644
--- a/src/backend/utils/activity/pgstat_backend.c
+++ b/src/backend/utils/activity/pgstat_backend.c
@@ -25,6 +25,7 @@
#include "postgres.h"
#include "access/xlog.h"
+#include "executor/instrument.h"
#include "storage/bufmgr.h"
#include "storage/proc.h"
#include "storage/procarray.h"
diff --git a/src/include/pgstat.h b/src/include/pgstat.h
index f402b17295c..e4a59a30b8c 100644
--- a/src/include/pgstat.h
+++ b/src/include/pgstat.h
@@ -11,6 +11,7 @@
#ifndef PGSTAT_H
#define PGSTAT_H
+#include "access/transam.h" /* for FullTransactionId */
#include "datatype/timestamp.h"
#include "portability/instr_time.h"
#include "postmaster/pgarch.h" /* for MAX_XFN_CHARS */
diff --git a/src/include/replication/conflict.h b/src/include/replication/conflict.h
index e516caa5c73..c8fbf9e51b8 100644
--- a/src/include/replication/conflict.h
+++ b/src/include/replication/conflict.h
@@ -9,9 +9,16 @@
#ifndef CONFLICT_H
#define CONFLICT_H
-#include "nodes/execnodes.h"
+#include "access/xlogdefs.h"
+#include "nodes/pg_list.h"
#include "utils/timestamp.h"
+/* Avoid including execnodes.h here */
+typedef struct EState EState;
+typedef struct ResultRelInfo ResultRelInfo;
+typedef struct TupleTableSlot TupleTableSlot;
+
+
/*
* Conflict types that could occur while applying remote changes.
*