postgresql/src/include/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
..
amapi.h Introduce IndexAM fields for parallel vacuum. 2020-01-15 07:24:14 +05:30
amvalidate.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
attmap.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
attnum.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_internal.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_page.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_pageops.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_revmap.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_tuple.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
brin_xlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
bufmask.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
clog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
commit_ts.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
detoast.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
genam.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
generic_xlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
gin.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
gin_private.h Avoid full scan of GIN indexes when possible 2020-01-18 01:11:39 +03:00
ginblock.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
ginxlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
gist.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
gist_private.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
gistscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
gistxlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
hash.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
hash_xlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
heapam.h Allow vacuum command to process indexes in parallel. 2020-01-20 07:57:49 +05:30
heapam_xlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
heaptoast.h tableam: New callback relation_fetch_toast_slice. 2020-01-07 14:36:38 -05:00
hio.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
htup.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
htup_details.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
itup.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
multixact.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nbtree.h nbtree: Rename BT_HEAP_TID_ATTR. 2020-01-10 13:15:28 -08:00
nbtxlog.h Add xl_btree_delete optimization. 2020-01-03 12:18:13 -08:00
parallel.h Allow vacuum command to process indexes in parallel. 2020-01-20 07:57:49 +05:30
printsimple.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
printtup.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
relation.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
reloptions.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
relscan.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
rewriteheap.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
rmgr.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
rmgrlist.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
sdir.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
session.h Fix typo. 2020-01-13 14:44:55 +05:30
skey.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
slru.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
spgist.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
spgist_private.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
spgxlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
stratnum.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
subtrans.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
sysattr.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
table.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tableam.h Remove bogus 'return'. 2020-01-09 09:01:37 -05:00
timeline.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
toast_helper.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
toast_internals.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
transam.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tsmapi.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tupconvert.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tupdesc.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tupdesc_details.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
tupmacs.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
twophase.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
twophase_rmgr.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
valid.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
visibilitymap.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
xact.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
xlog.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
xlog_internal.h Add xl_btree_delete optimization. 2020-01-03 12:18:13 -08:00
xlogdefs.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
xloginsert.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
xlogreader.h Refactor XLogReadRecord(), adding XLogBeginRead() function. 2020-01-26 11:39:00 +02:00
xlogrecord.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
xlogutils.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00