From 7bb50dd7d6b9f3cbad005aeb6eb9e4a065481b25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Herrera?= Date: Thu, 26 Feb 2026 13:50:12 +0100 Subject: [PATCH] Reduce includes in pgstat.h The lack of fallout here is somewhat surprising. Author: Andres Freund Discussion: https://postgr.es/m/aY-UE-4t7FiYgH3t@alap3.anarazel.de --- src/include/pgstat.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 9bb777c3d5a..0e9d2b4c623 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -11,7 +11,6 @@ #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 */ @@ -19,10 +18,16 @@ #include "utils/backend_progress.h" /* for backward compatibility */ /* IWYU pragma: export */ #include "utils/backend_status.h" /* for backward compatibility */ /* IWYU pragma: export */ #include "utils/pgstat_kind.h" -#include "utils/relcache.h" #include "utils/wait_event.h" /* for backward compatibility */ /* IWYU pragma: export */ +/* avoid including access/transam.h */ +typedef struct FullTransactionId FullTransactionId; + +/* avoid including utils/relcache.h */ +typedef struct RelationData *Relation; + + /* ---------- * Paths for the statistics files (relative to installation's $PGDATA). * ----------