postgresql/src/include
Thomas Munro 3f1ce97346 Add circular WAL decoding buffer, take II.
Teach xlogreader.c to decode the WAL into a circular buffer.  This will
support optimizations based on looking ahead, to follow in a later
commit.

 * XLogReadRecord() works as before, decoding records one by one, and
   allowing them to be examined via the traditional XLogRecGetXXX()
   macros and certain traditional members like xlogreader->ReadRecPtr.

 * An alternative new interface XLogReadAhead()/XLogNextRecord() is
   added that returns pointers to DecodedXLogRecord objects so that it's
   now possible to look ahead in the WAL stream while replaying.

 * In order to be able to use the new interface effectively while
   streaming data, support is added for the page_read() callback to
   respond to a new nonblocking mode with XLREAD_WOULDBLOCK instead of
   waiting for more data to arrive.

No direct user of the new interface is included in this commit, though
XLogReadRecord() uses it internally.  Existing code doesn't need to
change, except in a few places where it was accessing reader internals
directly and now needs to go through accessor macros.

Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com>
Reviewed-by: Andres Freund <andres@anarazel.de> (earlier versions)
Discussion: https://postgr.es/m/CA+hUKGJ4VJN8ttxScUFM8dOKX0BrBiboo5uz1cq=AovOddfHpA@mail.gmail.com
2022-03-18 18:45:47 +13:00
..
access Add circular WAL decoding buffer, take II. 2022-03-18 18:45:47 +13:00
bootstrap Update copyright for 2022 2022-01-07 19:04:57 -05:00
catalog Add option to use ICU as global locale provider 2022-03-17 11:13:16 +01:00
commands Allow specifying row filters for logical replication of tables. 2022-02-22 08:11:50 +05:30
common Remove IS_AF_UNIX macro 2022-02-15 10:16:34 +01:00
datatype Update copyright for 2022 2022-01-07 19:04:57 -05:00
executor Fix SPI's handling of errors during transaction commit. 2022-02-28 12:45:36 -05:00
fe_utils Update copyright for 2022 2022-01-07 19:04:57 -05:00
foreign Update copyright for 2022 2022-01-07 19:04:57 -05:00
jit Update copyright for 2022 2022-01-07 19:04:57 -05:00
lib dshash: Add sequential scan support. 2022-03-10 12:57:05 -08:00
libpq Fix collection of typos in the code and the documentation 2022-03-15 11:29:35 +09:00
mb Update copyright for 2022 2022-01-07 19:04:57 -05:00
nodes Don't bother to attach column name lists to RowExprs of named types. 2022-03-17 18:25:44 -04:00
optimizer Update copyright for 2022 2022-01-07 19:04:57 -05:00
parser Add parse_analyze_withcb() 2022-03-09 11:08:16 +01:00
partitioning Update copyright for 2022 2022-01-07 19:04:57 -05:00
port Declare aarch64 has single copy atomicity for 8 byte values. 2022-03-18 13:40:26 +13:00
portability Update copyright for 2022 2022-01-07 19:04:57 -05:00
postmaster Allow archiving via loadable modules. 2022-02-03 14:05:02 -05:00
regex Update copyright for 2022 2022-01-07 19:04:57 -05:00
replication Allow extensions to add new backup targets. 2022-03-15 13:22:04 -04:00
rewrite Update copyright for 2022 2022-01-07 19:04:57 -05:00
snowball Update copyright for 2022 2022-01-07 19:04:57 -05:00
statistics Add stxdinherit flag to pg_statistic_ext_data 2022-01-16 13:38:01 +01:00
storage Remove some pointless code in block.h. 2022-03-03 19:15:38 -05:00
tcop Add pg_analyze_and_rewrite_varparams() 2022-03-07 08:13:30 +01:00
tsearch Update copyright for 2022 2022-01-07 19:04:57 -05:00
utils Add option to use ICU as global locale provider 2022-03-17 11:13:16 +01:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
c.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
fmgr.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
funcapi.h Create routine able to set single-call SRFs for Materialize mode 2022-03-07 10:26:29 +09:00
getaddrinfo.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
getopt_long.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
Makefile Build in some knowledge about foreign-key relationships in the catalogs. 2021-02-02 17:11:55 -05:00
miscadmin.h Remove MaxBackends variable in favor of GetMaxBackends() function. 2022-02-08 15:53:19 -05:00
pg_config.h.in Add support for building with ZSTD. 2022-02-18 13:40:31 -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 Fix DROP {DATABASE,TABLESPACE} on Windows. 2022-02-12 10:21:23 +13:00
pg_getopt.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_trace.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgstat.h Reconsider pg_stat_subscription_workers view. 2022-03-01 06:17:52 +05:30
pgtar.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgtime.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
port.h Clean up messy API for src/port/thread.c. 2022-01-11 13:46:20 -05:00
postgres.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
rusagestub.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
windowapi.h Update copyright for 2022 2022-01-07 19:04:57 -05:00