diff options
Diffstat (limited to 'src/include/access/xlogreader.h')
-rw-r--r-- | src/include/access/xlogreader.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/include/access/xlogreader.h b/src/include/access/xlogreader.h index 7553cc44cb3..deaa7f5128b 100644 --- a/src/include/access/xlogreader.h +++ b/src/include/access/xlogreader.h @@ -139,16 +139,22 @@ struct XLogReaderState * ---------------------------------------- */ - /* Buffer for currently read page (XLOG_BLCKSZ bytes) */ + /* + * Buffer for currently read page (XLOG_BLCKSZ bytes, valid up to at least + * readLen bytes) + */ char *readBuf; + uint32 readLen; - /* last read segment, segment offset, read length, TLI */ + /* last read segment, segment offset, TLI for data currently in readBuf */ XLogSegNo readSegNo; uint32 readOff; - uint32 readLen; TimeLineID readPageTLI; - /* beginning of last page read, and its TLI */ + /* + * beginning of prior page read, and its TLI. Doesn't necessarily + * correspond to what's in readBuf; used for timeline sanity checks. + */ XLogRecPtr latestPagePtr; TimeLineID latestPageTLI; @@ -174,6 +180,9 @@ extern void XLogReaderFree(XLogReaderState *state); extern struct XLogRecord *XLogReadRecord(XLogReaderState *state, XLogRecPtr recptr, char **errormsg); +/* Invalidate read state */ +extern void XLogReaderInvalReadState(XLogReaderState *state); + #ifdef FRONTEND extern XLogRecPtr XLogFindNextRecord(XLogReaderState *state, XLogRecPtr RecPtr); #endif /* FRONTEND */ |