pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove read_page callback from XLogReader.
Date: Thu, 08 Apr 2021 11:23:10 +0000
Message-ID: <E1lUSkg-0007xJ-CE@gemulon.postgresql.org> (raw)

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 <horiguchi.kyotaro@lab.ntt.co.jp>
Author: Heikki Linnakangas <hlinnaka@iki.fi> (parts of earlier version)
Reviewed-by: Antonin Houska <ah@cybertec.at>
Reviewed-by: Alvaro Herrera <alvherre@2ndquadrant.com>
Reviewed-by: Takashi Menjo <takashi.menjo@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
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(-)



Message-ID: <E1lUSkg-0007xJ-CE@gemulon.postgresql.org>
Permalink:  ../E1lUSkg-0007xJ-CE@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lUSkg-0007xJ-CE@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: Remove read_page callback from XLogReader.
  In-Reply-To: <E1lUSkg-0007xJ-CE@gemulon.postgresql.org>
  References: <E1lUSkg-0007xJ-CE@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox