From 323cbe7c7ddcf18aaf24b7f6d682a45a61d4e31b Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Thu, 8 Apr 2021 23:03:23 +1200 Subject: Remove read_page callback from XLogReader. Previously, the XLogReader module would fetch new input data using a callback function. Redesign the interface so that it tells the caller to insert more data with a special return value instead. This API suits later patches for prefetching, encryption and maybe other future projects that would otherwise require continually extending the callback interface. As incidental cleanup work, move global variables readOff, readLen and readSegNo inside XlogReaderState. Author: Kyotaro HORIGUCHI Author: Heikki Linnakangas (parts of earlier version) Reviewed-by: Antonin Houska Reviewed-by: Alvaro Herrera Reviewed-by: Takashi Menjo Reviewed-by: Andres Freund Reviewed-by: Thomas Munro Discussion: https://postgr.es/m/20190418.210257.43726183.horiguchi.kyotaro%40lab.ntt.co.jp --- src/include/access/xlogutils.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/include/access/xlogutils.h') diff --git a/src/include/access/xlogutils.h b/src/include/access/xlogutils.h index 9ac602b674d..397fb27fc22 100644 --- a/src/include/access/xlogutils.h +++ b/src/include/access/xlogutils.h @@ -47,9 +47,7 @@ extern Buffer XLogReadBufferExtended(RelFileNode rnode, ForkNumber forknum, extern Relation CreateFakeRelcacheEntry(RelFileNode rnode); extern void FreeFakeRelcacheEntry(Relation fakerel); -extern int read_local_xlog_page(XLogReaderState *state, - XLogRecPtr targetPagePtr, int reqLen, - XLogRecPtr targetRecPtr, char *cur_page); +extern bool read_local_xlog_page(XLogReaderState *state); extern void wal_segment_open(XLogReaderState *state, XLogSegNo nextSegNo, TimeLineID *tli_p); -- cgit v1.2.3