From 007693f2a3ac2ac19affcb03ad43cdb36ccff5b5 Mon Sep 17 00:00:00 2001 From: Amit Kapila Date: Thu, 4 Jan 2024 08:21:51 +0530 Subject: 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 --- doc/src/sgml/system-views.sgml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'doc/src/sgml') diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgml index 0ef17456318..72d01fc624c 100644 --- a/doc/src/sgml/system-views.sgml +++ b/doc/src/sgml/system-views.sgml @@ -2525,11 +2525,34 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx - conflicting bool + conflict_reason text - True if this logical slot conflicted with recovery (and so is now - invalidated). Always NULL for physical slots. + 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 means that the required WAL has been + removed. + + + + + rows_removed means that the required rows have + been removed. + + + + + wal_level_insufficient means that the + primary doesn't have a sufficient to + perform logical decoding. + + + -- cgit v1.2.3