postgresql/src/backend/access
Heikki Linnakangas 38a957316d Refactor XLogReadRecord(), adding XLogBeginRead() function.
The signature of XLogReadRecord() required the caller to pass the starting
WAL position as argument, or InvalidXLogRecPtr to continue reading at the
end of previous record. That's slightly awkward to the callers, as most
of them don't want to randomly jump around in the WAL stream, but start
reading at one position and then read everything from that point onwards.
Remove the 'RecPtr' argument and add a new function XLogBeginRead() to
specify the starting position instead. That's more convenient for the
callers. Also, xlogreader holds state that is reset when you change the
starting position, so having a separate function for doing that feels like
a more natural fit.

This changes XLogFindNextRecord() function so that it doesn't reset the
xlogreader's state to what it was before the call anymore. Instead, it
positions the xlogreader to the found record, like XLogBeginRead().

Reviewed-by: Kyotaro Horiguchi, Alvaro Herrera
Discussion: https://www.postgresql.org/message-id/5382a7a3-debe-be31-c860-cb810c08f366%40iki.fi
2020-01-26 11:39:00 +02:00
..
brin Fix crash in BRIN inclusion op functions, due to missing datum copy. 2020-01-20 10:36:35 +02:00
common tableam: New callback relation_fetch_toast_slice. 2020-01-07 14:36:38 -05:00
gin Avoid full scan of GIN indexes when possible 2020-01-18 01:11:39 +03:00
gist Introduce IndexAM fields for parallel vacuum. 2020-01-15 07:24:14 +05:30
hash Introduce IndexAM fields for parallel vacuum. 2020-01-15 07:24:14 +05:30
heap Clarify some comments in vacuumlazy.c 2020-01-23 15:56:56 +09:00
index Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nbtree Introduce IndexAM fields for parallel vacuum. 2020-01-15 07:24:14 +05:30
rmgrdesc Add xl_btree_delete optimization. 2020-01-03 12:18:13 -08:00
spgist Introduce IndexAM fields for parallel vacuum. 2020-01-15 07:24:14 +05:30
table Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tablesample Update copyrights for 2020 2020-01-01 12:21:45 -05:00
transam Refactor XLogReadRecord(), adding XLogBeginRead() function. 2020-01-26 11:39:00 +02:00
Makefile Introduce access/{table.h, relation.h}, for generic functions from heapam.h. 2019-01-21 10:51:36 -08:00