postgresql/src/include
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 Add functions gcd() and lcm() for integer and numeric types. 2020-01-25 14:00:59 +00:00
commands Clean up EXPLAIN's handling of per-worker details. 2020-01-25 18:16:42 -05:00
common Move OpenSSL routines for min/max protocol setting to src/common/ 2020-01-17 10:06:17 +09:00
datatype Update copyrights for 2020 2020-01-01 12:21:45 -05:00
executor Improve the handling of result type coercions in SQL functions. 2020-01-08 11:07:59 -05:00
fe_utils Reduce size of backend scanner's tables. 2020-01-13 15:04:31 -05: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 Skip memcpy(x, x) in qunique(). 2020-01-04 11:31:42 -08:00
libpq Update copyrights for 2020 2020-01-01 12:21:45 -05:00
mb Rationalize code placement between wchar.c, encnames.c, and mbutils.c. 2020-01-16 18:08:21 -05:00
nodes Repair more failures with SubPlans in multi-row VALUES lists. 2020-01-17 16:17:31 -05:00
optimizer Update copyrights for 2020 2020-01-01 12:21:45 -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
port Update copyrights for 2020 2020-01-01 12:21:45 -05:00
portability Update copyrights for 2020 2020-01-01 12:21:45 -05:00
postmaster Update copyrights for 2020 2020-01-01 12:21:45 -05:00
regex Update copyrights for 2020 2020-01-01 12:21:45 -05:00
replication Set ReorderBufferTXN->final_lsn more eagerly 2020-01-17 18:00:39 -03:00
rewrite Update copyrights for 2020 2020-01-01 12:21:45 -05:00
snowball Update copyrights for 2020 2020-01-01 12:21:45 -05:00
statistics Update copyrights for 2020 2020-01-01 12:21:45 -05:00
storage Add pg_file_sync() to adminpack extension. 2020-01-24 20:42:52 +09:00
tcop Fix problems with "read only query" checks, and refactor the code. 2020-01-16 12:11:31 -05:00
tsearch Update copyrights for 2020 2020-01-01 12:21:45 -05:00
utils Split JSON lexer/parser from 'json' data type support. 2020-01-24 10:17:43 -08:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
Makefile Get rid of jsonpath_gram.h and jsonpath_scanner.h 2019-03-20 11:13:34 +03:00
c.h Remove STATUS_FOUND 2020-01-11 07:48:57 +01:00
fmgr.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
funcapi.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
getaddrinfo.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
getopt_long.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
miscadmin.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_config.h.in Add configure probe for rl_completion_suppress_quote. 2020-01-23 18:20:57 -05:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_getopt.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pg_trace.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pgstat.h Add GUC variables for stat tracking and timeout as PGDLLIMPORT 2020-01-21 13:46:39 +09:00
pgtar.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pgtime.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
port.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
postgres.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
rusagestub.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
windowapi.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00