mirror of
https://github.com/postgres/postgres.git
synced 2025-10-24 01:29:19 +03:00
Rework WAL-reading supporting structs
The state-tracking of WAL reading in various places was pretty messy, mostly because the ancient physical-replication WAL reading code wasn't using the XLogReader abstraction. This led to some untidy code. Make it prettier by creating two additional supporting structs, WALSegmentContext and WALOpenSegment which keep track of WAL-reading state. This makes code cleaner, as well as supports more future cleanup. Author: Antonin Houska Reviewed-by: Álvaro Herrera and (older versions) Robert Haas Discussion: https://postgr.es/m/14984.1554998742@spoje.net
This commit is contained in:
@@ -49,8 +49,7 @@ extern void FreeFakeRelcacheEntry(Relation fakerel);
|
||||
|
||||
extern int read_local_xlog_page(XLogReaderState *state,
|
||||
XLogRecPtr targetPagePtr, int reqLen,
|
||||
XLogRecPtr targetRecPtr, char *cur_page,
|
||||
TimeLineID *pageTLI);
|
||||
XLogRecPtr targetRecPtr, char *cur_page);
|
||||
|
||||
extern void XLogReadDetermineTimeline(XLogReaderState *state,
|
||||
XLogRecPtr wantPage, uint32 wantLength);
|
||||
|
||||
Reference in New Issue
Block a user