postgresql/src/backend
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
..
access Refactor XLogReadRecord(), adding XLogBeginRead() function. 2020-01-26 11:39:00 +02:00
bootstrap Update copyrights for 2020 2020-01-01 12:21:45 -05:00
catalog Fix concurrent indexing operations with temporary tables 2020-01-22 09:49:18 +09:00
commands Clean up EXPLAIN's handling of per-worker details. 2020-01-25 18:16:42 -05:00
executor Fix edge case leading to agg transitions skipping ExecAggTransReparent() calls. 2020-01-20 23:26:51 -08:00
foreign Update copyrights for 2020 2020-01-01 12:21:45 -05:00
jit Update copyrights for 2020 2020-01-01 12:21:45 -05:00
lib Update copyrights for 2020 2020-01-01 12:21:45 -05:00
libpq Move OpenSSL routines for min/max protocol setting to src/common/ 2020-01-17 10:06:17 +09:00
main Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nodes Reconsider the representation of join alias Vars. 2020-01-09 11:56:59 -05:00
optimizer Reconsider the representation of join alias Vars. 2020-01-09 11:56:59 -05:00
parser Restructure ALTER TABLE execution to fix assorted bugs. 2020-01-15 18:49:24 -05:00
partitioning Update copyrights for 2020 2020-01-01 12:21:45 -05:00
po Translation updates 2019-06-17 15:30:20 +02:00
port Update copyrights for 2020 2020-01-01 12:21:45 -05:00
postmaster Allow vacuum command to process indexes in parallel. 2020-01-20 07:57:49 +05:30
regex Update copyrights for 2020 2020-01-01 12:21:45 -05:00
replication Refactor XLogReadRecord(), adding XLogBeginRead() function. 2020-01-26 11:39:00 +02:00
rewrite Make rewriter prevent auto-updates on views with conditional INSTEAD rules. 2020-01-14 09:52:21 +00:00
snowball Update copyrights for 2020 2020-01-01 12:21:45 -05:00
statistics Report progress of ANALYZE commands 2020-01-15 11:14:39 -03:00
storage Add pg_file_sync() to adminpack extension. 2020-01-24 20:42:52 +09:00
tcop Silence minor compiler warnings. 2020-01-19 16:04:36 -05:00
tsearch Adjust src/include/utils/jsonapi.h so it's not backend-only. 2020-01-24 09:58:37 -08:00
utils Add functions gcd() and lcm() for integer and numeric types. 2020-01-25 14:00:59 +00:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Update copyrights for 2020 2020-01-01 12:21:45 -05:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Translation updates 2019-05-20 16:00:53 +02:00