pgsql: Remove read_page callback from XLogReader. - Mailing list pgsql-committers

From Thomas Munro
Subject pgsql: Remove read_page callback from XLogReader.
Date
Msg-id [email protected]
Whole thread Raw
List pgsql-committers
Remove read_page callback from XLogReader.

Previously, the XLogReader module would fetch new input data using a
callback function.  Redesign the interface so that it tells the caller
to insert more data with a special return value instead.  This API suits
later patches for prefetching, encryption and maybe other future
projects that would otherwise require continually extending the callback
interface.

As incidental cleanup work, move global variables readOff, readLen and
readSegNo inside XlogReaderState.

Author: Kyotaro HORIGUCHI <[email protected]>
Author: Heikki Linnakangas <[email protected]> (parts of earlier version)
Reviewed-by: Antonin Houska <[email protected]>
Reviewed-by: Alvaro Herrera <[email protected]>
Reviewed-by: Takashi Menjo <[email protected]>
Reviewed-by: Andres Freund <[email protected]>
Reviewed-by: Thomas Munro <[email protected]>
Discussion: https://postgr.es/m/20190418.210257.43726183.horiguchi.kyotaro%40lab.ntt.co.jp

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/323cbe7c7ddcf18aaf24b7f6d682a45a61d4e31b

Modified Files
--------------
src/backend/access/transam/twophase.c          |  14 +-
src/backend/access/transam/xlog.c              | 126 ++--
src/backend/access/transam/xlogreader.c        | 931 +++++++++++++++----------
src/backend/access/transam/xlogutils.c         |  24 +-
src/backend/replication/logical/logical.c      |  26 +-
src/backend/replication/logical/logicalfuncs.c |  13 +-
src/backend/replication/slotfuncs.c            |  18 +-
src/backend/replication/walsender.c            |  42 +-
src/bin/pg_rewind/parsexlog.c                  | 107 +--
src/bin/pg_waldump/pg_waldump.c                | 138 ++--
src/include/access/xlogreader.h                | 153 ++--
src/include/access/xlogutils.h                 |   4 +-
src/include/replication/logical.h              |  11 +-
13 files changed, 930 insertions(+), 677 deletions(-)


pgsql-committers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: pgsql: Move pg_stat_statements query jumbling to core.
Next
From: David Rowley
Date:
Subject: pgsql: Speedup ScalarArrayOpExpr evaluation