doc: Clarify when backend_xmin in pg_stat_replication can be NULL.
authorFujii Masao <fujii@postgresql.org>
Fri, 17 Oct 2025 05:03:42 +0000 (14:03 +0900)
committerFujii Masao <fujii@postgresql.org>
Fri, 17 Oct 2025 05:03:42 +0000 (14:03 +0900)
Improve the documentation of pg_stat_replication to explain when
the backend_xmin column becomes NULL. This happens when
a replication slot is used (the xmin is then shown in pg_replication_slots)
or when hot_standby_feedback is disabled.

Author: Renzo Dani <arons7@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CA+XOKQAMXzskpdUmj2sg03_5fmiXc2Gs0r3TX1_rmcFcqh+=xQ@mail.gmail.com

doc/src/sgml/monitoring.sgml

index dc4fc29466d94e0656c91185ea58460a541a2c34..d5f0fb7ba7c95c4fb769cdd3af997692182a6696 100644 (file)
@@ -1287,6 +1287,10 @@ description | Waiting for a newly initialized WAL file to reach durable storage
       <para>
        This standby's <literal>xmin</literal> horizon reported
        by <xref linkend="guc-hot-standby-feedback"/>.
+       This field will be null if a replication slot is used (in this case,
+       the standby's <literal>xmin</literal> is shown in
+       <link linkend="view-pg-replication-slots">pg_replication_slots</link>)
+       or if <varname>hot_standby_feedback</varname> is disabled.
       </para></entry>
      </row>