pgsql: Track conflict_reason in pg_replication_slots. - Mailing list pgsql-committers

From Amit Kapila
Subject pgsql: Track conflict_reason in pg_replication_slots.
Date
Msg-id E1rLECI-00DNtu-CA@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Track conflict_reason in pg_replication_slots.

This patch changes the existing 'conflicting' field to 'conflict_reason'
in pg_replication_slots. This new field indicates the reason for the
logical slot's conflict with recovery. It is always NULL for physical
slots, as well as for logical slots which are not invalidated. The
non-NULL values indicate that the slot is marked as invalidated. Possible
values are:

wal_removed = required WAL has been removed.
rows_removed = required rows have been removed.
wal_level_insufficient = the primary doesn't have a wal_level sufficient
to perform logical decoding.

The existing users of 'conflicting' column can get the same answer by
using 'conflict_reason' IS NOT NULL.

Author: Shveta Malik
Reviewed-by: Amit Kapila, Bertrand Drouvot, Michael Paquier
Discussion: https://postgr.es/m/ZYOE8IguqTbp-seF@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/007693f2a3ac2ac19affcb03ad43cdb36ccff5b5

Modified Files
--------------
doc/src/sgml/system-views.sgml                     | 29 ++++++++-
src/backend/catalog/system_views.sql               |  2 +-
src/backend/replication/slotfuncs.c                | 22 +++++--
src/bin/pg_upgrade/info.c                          |  4 +-
src/include/catalog/catversion.h                   |  2 +-
src/include/catalog/pg_proc.dat                    |  4 +-
.../recovery/t/035_standby_logical_decoding.pl     | 72 ++++++++++++----------
src/test/regress/expected/rules.out                |  4 +-
8 files changed, 90 insertions(+), 49 deletions(-)


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: Update copyright for 2024
Next
From: David Rowley
Date:
Subject: pgsql: Fix use of incorrect TupleTableSlot in DISTINCT aggregates