]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Reduce includes in pgstat.h
authorÁlvaro Herrera <alvherre@kurilemu.de>
Thu, 26 Feb 2026 12:50:12 +0000 (13:50 +0100)
committerÁlvaro Herrera <alvherre@kurilemu.de>
Thu, 26 Feb 2026 12:50:24 +0000 (13:50 +0100)
The lack of fallout here is somewhat surprising.

Author: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/aY-UE-4t7FiYgH3t@alap3.anarazel.de

src/include/pgstat.h

index 9bb777c3d5a828d59c2c523e8dfd787916e4d07b..0e9d2b4c6235f159d82a374cb9ad1bfe492e5987 100644 (file)
@@ -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 */
 #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).
  * ----------