From ab130eba20dd0e3891ed20a866e97e22b8f55e84 Mon Sep 17 00:00:00 2001 From: Mark Dilger Date: Tue, 20 Oct 2020 16:42:23 -0700 Subject: [PATCH v2 3/3] Using forward declarations to reduce including headers Using forward declarations of StringInfoData and XLogReaderState to avoid pulling in so many symbols from access/xlog_internal.h --- src/include/access/xlog_internal.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h index 0263166080..7e177c2320 100644 --- a/src/include/access/xlog_internal.h +++ b/src/include/access/xlog_internal.h @@ -21,13 +21,12 @@ #include "access/xlogdefs.h" #include "access/xlogfname.h" -#include "access/xlogreader.h" #include "access/xlogstartup.h" #include "datatype/timestamp.h" -#include "lib/stringinfo.h" #include "storage/block.h" -#include "storage/relfilenode.h" +typedef struct XLogReaderState XLogReaderState; +typedef struct StringInfoData StringInfoData; /* * Each page of XLOG file has a header like this: @@ -156,7 +155,7 @@ typedef struct RmgrData { const char *rm_name; void (*rm_redo) (XLogReaderState *record); - void (*rm_desc) (StringInfo buf, XLogReaderState *record); + void (*rm_desc) (struct StringInfoData *buf, XLogReaderState *record); const char *(*rm_identify) (uint8 info); void (*rm_startup) (void); void (*rm_cleanup) (void); -- 2.21.1 (Apple Git-122.3)