diff options
author | Thomas Munro <tmunro@postgresql.org> | 2021-04-08 23:03:23 +1200 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2021-04-08 23:20:42 +1200 |
commit | 323cbe7c7ddcf18aaf24b7f6d682a45a61d4e31b (patch) | |
tree | 5290af3834511b9bd1773841b1068e485ba52fe6 /src/include/access/xlogutils.h | |
parent | 5ac9c4307337313bedeafc21dbbab93ba809241c (diff) | |
download | postgresql-323cbe7c7ddcf18aaf24b7f6d682a45a61d4e31b.tar.gz postgresql-323cbe7c7ddcf18aaf24b7f6d682a45a61d4e31b.zip |
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 <horiguchi.kyotaro@lab.ntt.co.jp>
Author: Heikki Linnakangas <hlinnaka@iki.fi> (parts of earlier version)
Reviewed-by: Antonin Houska <ah@cybertec.at>
Reviewed-by: Alvaro Herrera <alvherre@2ndquadrant.com>
Reviewed-by: Takashi Menjo <takashi.menjo@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://postgr.es/m/20190418.210257.43726183.horiguchi.kyotaro%40lab.ntt.co.jp
Diffstat (limited to 'src/include/access/xlogutils.h')
-rw-r--r-- | src/include/access/xlogutils.h | 4 |
1 files changed, 1 insertions, 3 deletions
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); |