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

Lines changed: 3 additions & 3 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy