From 566868daf77315fd1792e3a79dd7d5ad9a0994af Mon Sep 17 00:00:00 2001
From: Andres Freund <andres@anarazel.de>
Date: Fri, 20 Mar 2026 12:28:40 -0400
Subject: [PATCH v2 5/9] Don't include xlogreader.h in xlog.h

xlogreader.h includes a bunch of lower level headers that most xact.h users
don't need. In particular, tableam.h includes xact.h (due to the checks added
by 7259736a6e5b), which exposes xlogreader.h far too widely.

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 src/include/access/xact.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index f0b4d795071..250b6d92050 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -15,13 +15,16 @@
 #define XACT_H
 
 #include "access/transam.h"
-#include "access/xlogreader.h"
 #include "datatype/timestamp.h"
 #include "lib/stringinfo.h"
 #include "nodes/pg_list.h"
 #include "storage/relfilelocator.h"
 #include "storage/sinval.h"
 
+
+/* forward references in this file */
+typedef struct XLogReaderState XLogReaderState;
+
 /*
  * Maximum size of Global Transaction ID (including '\0').
  *
-- 
2.53.0.1.gb2826b52eb

