From: | Amit Kapila <akapila(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Allow to enable failover property for replication slots via SQL |
Date: | 2024-01-25 06:58:32 |
Message-ID: | E1rSth2-0030K6-Tn@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Allow to enable failover property for replication slots via SQL API.
This commit adds the failover property to the replication slot. The
failover property indicates whether the slot will be synced to the standby
servers, enabling the resumption of corresponding logical replication
after failover. But note that this commit does not yet include the
capability to sync the replication slot; the subsequent commits will add
that capability.
A new optional parameter 'failover' is added to the
pg_create_logical_replication_slot() function. We will also enable to set
'failover' option for slots via the subscription commands in the
subsequent commits.
The value of the 'failover' flag is displayed as part of
pg_replication_slots view.
Author: Hou Zhijie, Shveta Malik, Ajin Cherian
Reviewed-by: Peter Smith, Bertrand Drouvot, Dilip Kumar, Masahiko Sawada, Nisha Moond, Kuroda, Hayato, Amit Kapila
Discussion: https://postgr.es/m/514f6f2f-6833-4539-39f1-96cd1e011f23@enterprisedb.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c393308b69d229b664391ac583b9e07418d411b6
Modified Files
--------------
contrib/test_decoding/expected/slot.out | 58 ++++++++++++++++++++++++++++++++
contrib/test_decoding/sql/slot.sql | 13 +++++++
doc/src/sgml/func.sgml | 11 ++++--
doc/src/sgml/system-views.sgml | 10 ++++++
src/backend/catalog/system_functions.sql | 1 +
src/backend/catalog/system_views.sql | 3 +-
src/backend/replication/slot.c | 8 +++--
src/backend/replication/slotfuncs.c | 16 +++++++--
src/backend/replication/walsender.c | 4 +--
src/bin/pg_upgrade/info.c | 5 ++-
src/bin/pg_upgrade/pg_upgrade.c | 6 ++--
src/bin/pg_upgrade/pg_upgrade.h | 2 ++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 14 ++++----
src/include/replication/slot.h | 8 ++++-
src/test/regress/expected/rules.out | 5 +--
16 files changed, 141 insertions(+), 25 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-01-25 08:10:15 | pgsql: Add more LOG messages when starting and ending recovery from a b |
Previous Message | Peter Eisentraut | 2024-01-25 06:29:16 | pgsql: Fix comment on gist_stratnum_btree |