postgresql/src/bin
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
..
initdb Remove separate files for the initial contents of pg_(sh)description 2020-01-19 13:54:58 +02:00
pg_archivecleanup Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
pg_basebackup Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_checksums Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_config Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_controldata Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_ctl Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_dump Fix pg_dump's sigTermHandler() to use _exit() not exit(). 2020-01-20 12:57:17 -05:00
pg_resetwal Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_rewind Refactor XLogReadRecord(), adding XLogBeginRead() function. 2020-01-26 11:39:00 +02:00
pg_test_fsync Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
pg_test_timing Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
pg_upgrade Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_waldump Refactor XLogReadRecord(), adding XLogBeginRead() function. 2020-01-26 11:39:00 +02:00
pgbench pgbench: Make more debug messages use common logging API 2020-01-10 09:02:25 +09:00
pgevent Remove libpq.rc, use win32ver.rc for libpq 2020-01-15 15:06:12 +01:00
psql Add configure probe for rl_completion_suppress_quote. 2020-01-23 18:20:57 -05:00
scripts Update copyrights for 2020 2020-01-01 12:21:45 -05:00
Makefile Update copyrights for 2020 2020-01-01 12:21:45 -05:00