Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9c0de04

Browse files
committed
Reduce xlog.h inclusion footprint
This file needs xlogreader.h only for the XLogReaderState typedef; but we can dodge that by forward-declaring it. Many files use xlog.h for reasons other than reading WAL, and it's not good to force all those files to include xlogreader.h, so take it out. Surprisingly, there is no fallout in core code from making this change. Perhaps external code will have to start including xlogreader.h.
1 parent c929b27 commit 9c0de04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/include/access/xlog.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
#include "access/xlogbackup.h"
1515
#include "access/xlogdefs.h"
16-
#include "access/xlogreader.h"
1716
#include "datatype/timestamp.h"
1817
#include "lib/stringinfo.h"
1918
#include "nodes/pg_list.h"
@@ -192,6 +191,7 @@ typedef enum WALAvailability
192191
} WALAvailability;
193192

194193
struct XLogRecData;
194+
struct XLogReaderState;
195195

196196
extern XLogRecPtr XLogInsertRecord(struct XLogRecData *rdata,
197197
XLogRecPtr fpw_lsn,
@@ -209,8 +209,8 @@ extern XLogSegNo XLogGetLastRemovedSegno(void);
209209
extern void XLogSetAsyncXactLSN(XLogRecPtr asyncXactLSN);
210210
extern void XLogSetReplicationSlotMinimumLSN(XLogRecPtr lsn);
211211

212-
extern void xlog_redo(XLogReaderState *record);
213-
extern void xlog_desc(StringInfo buf, XLogReaderState *record);
212+
extern void xlog_redo(struct XLogReaderState *record);
213+
extern void xlog_desc(StringInfo buf, struct XLogReaderState *record);
214214
extern const char *xlog_identify(uint8 info);
215215

216216
extern void issue_xlog_fsync(int fd, XLogSegNo segno, TimeLineID tli);

0 commit comments

Comments
 (0)