pgsql: Ability to advance replication slots - Mailing list pgsql-committers

From Simon Riggs
Subject pgsql: Ability to advance replication slots
Date
Msg-id E1ebm6p-000761-Hc@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Ability to advance replication slots

Ability to advance both physical and logical replication slots using a
new user function pg_replication_slot_advance().

For logical advance that means records are consumed as fast as possible
and changes are not given to output plugin for sending. Makes 2nd phase
(after we reached SNAPBUILD_FULL_SNAPSHOT) of replication slot creation
faster, especially when there are big transactions as the reorder buffer
does not have to deal with data changes and does not have to spill to
disk.

Author: Petr Jelinek
Reviewed-by: Simon Riggs

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9c7d06d60680c7f00d931233873dee81fdb311c6

Modified Files
--------------
contrib/test_decoding/expected/slot.out        |  30 ++++
contrib/test_decoding/sql/slot.sql             |  15 ++
doc/src/sgml/func.sgml                         |  19 +++
src/backend/replication/logical/decode.c       |  44 ++++--
src/backend/replication/logical/logical.c      |  30 +++-
src/backend/replication/logical/logicalfuncs.c |   1 +
src/backend/replication/slotfuncs.c            | 200 +++++++++++++++++++++++++
src/backend/replication/walsender.c            |   1 +
src/include/catalog/pg_proc.h                  |   2 +
src/include/replication/logical.h              |   8 +
10 files changed, 333 insertions(+), 17 deletions(-)


pgsql-committers by date:

Previous
From: Amit Langote
Date:
Subject: Re: pgsql: Centralize json and jsonb handling of datetime types
Next
From: Tom Lane
Date:
Subject: pgsql: Remove useless lookup of root partitioned rel inExecInitModifyT