pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Track conflict_reason in pg_replication_slots.
Date: Thu, 04 Jan 2024 03:15:06 +0000
Message-ID: <E1rLECI-00DNtu-CA@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1rLECI-00DNtu-CA@gemulon.postgresql.org>
Permalink:  ../E1rLECI-00DNtu-CA@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rLECI-00DNtu-CA@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 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: Track conflict_reason in pg_replication_slots.
  In-Reply-To: <E1rLECI-00DNtu-CA@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