aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2024-01-04 08:21:51 +0530
committerAmit Kapila <akapila@postgresql.org>2024-01-04 08:26:25 +0530
commit007693f2a3ac2ac19affcb03ad43cdb36ccff5b5 (patch)
tree548cee95ca1d16e7b7f87baa951e779bf8f0dfd1 /doc/src
parent29275b1d177096597675b5c6e7e7c9db2df8f4df (diff)
downloadpostgresql-007693f2a3ac2ac19affcb03ad43cdb36ccff5b5.tar.gz
postgresql-007693f2a3ac2ac19affcb03ad43cdb36ccff5b5.zip
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
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/system-views.sgml29
1 files changed, 26 insertions, 3 deletions
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
<row>
<entry role="catalog_table_entry"><para role="column_definition">
- <structfield>conflicting</structfield> <type>bool</type>
+ <structfield>conflict_reason</structfield> <type>text</type>
</para>
<para>
- 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:
+ <itemizedlist spacing="compact">
+ <listitem>
+ <para>
+ <literal>wal_removed</literal> means that the required WAL has been
+ removed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>rows_removed</literal> means that the required rows have
+ been removed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>wal_level_insufficient</literal> means that the
+ primary doesn't have a <xref linkend="guc-wal-level"/> sufficient to
+ perform logical decoding.
+ </para>
+ </listitem>
+ </itemizedlist>
</para></entry>
</row>
</tbody>