From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow to enable failover property for replication slots via SQL
Date: Thu, 25 Jan 2024 06:58:32 +0000
Message-ID: <E1rSth2-0030K6-Tn@gemulon.postgresql.org> (raw)
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(-)
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: akapila@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Allow to enable failover property for replication slots via SQL
In-Reply-To: <E1rSth2-0030K6-Tn@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