On Tue, 2026-01-06 at 04:11 +0000, PG Doc comments form wrote: > https://www.postgresql.org/docs/current/routine-vacuuming.html#ROUTINE-VACUUMING > There are five points under this section; > "In this condition any transactions already in progress can continue, but > only read-only transactions can be started. Operations that modify database > records or truncate relations will fail. The VACUUM command can still be run > normally. Note that, contrary to what was sometimes recommended in earlier > releases, it is not necessary or desirable to stop the postmaster or enter > single user-mode in order to restore normal operation. Instead, follow these > steps:..." > > In the third point it says "Use pg_stat_replication to find slots where > age(xmin) or age(catalog_xmin) is large. In many cases, such slots were > created for replication to servers that no longer exist, or that have been > down for a long time." > However, those columns, ie: xmin and catalog_xmin exists in > pg_replication_slots metadata view. : > https://www.postgresql.org/docs/18/view-pg-replication-slots.html > Not in the pg_stat_replication. > > Please check if my observation is correct or not.
You are correct. Attached is a patch that fixes the documentation. Yours, Laurenz Albe
From 0914d40caa56ca1a216c206ded5507b26e0b40d5 Mon Sep 17 00:00:00 2001 From: Laurenz Albe <[email protected]> Date: Tue, 6 Jan 2026 10:51:30 +0100 Subject: [PATCH v1] Fix doc for recovering from approaching xid wraparound Commit a70bce43fb added instructions how to recover if PostgreSQL refuses to issue new transaction IDs because of imminent wraparound, but referred to pg_stat_replication where it should have referenced pg_replication_slots. In passing, decorate references to views with <structname> tags. Author: Laurenz Albe <[email protected]> Reported-By: Sanjaya Waruna <[email protected]> Discussion: https://postgr.es/m/176767268098.1084085.10345048667224193...@wrigleys.postgresql.org --- doc/src/sgml/maintenance.sgml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index 08e6489afb8..50c72eb30c3 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -701,20 +701,20 @@ HINT: Execute a database-wide VACUUM in that database. <orderedlist> <listitem> <simpara>Resolve old prepared transactions. You can find these by checking - <link linkend="view-pg-prepared-xacts">pg_prepared_xacts</link> for rows where + <link linkend="view-pg-prepared-xacts"><structname>pg_prepared_xacts</structname></link> for rows where <literal>age(transactionid)</literal> is large. Such transactions should be committed or rolled back.</simpara> </listitem> <listitem> <simpara>End long-running open transactions. You can find these by checking - <link linkend="monitoring-pg-stat-activity-view">pg_stat_activity</link> for rows where + <link linkend="monitoring-pg-stat-activity-view"><structname>pg_stat_activity</structname></link> for rows where <literal>age(backend_xid)</literal> or <literal>age(backend_xmin)</literal> is large. Such transactions should be committed or rolled back, or the session can be terminated using <literal>pg_terminate_backend</literal>.</simpara> </listitem> <listitem> <simpara>Drop any old replication slots. Use - <link linkend="monitoring-pg-stat-replication-view">pg_stat_replication</link> to + <link linkend="view-pg-replication-slots"><structname>pg_replication_slots</structname></link> to find slots where <literal>age(xmin)</literal> or <literal>age(catalog_xmin)</literal> is large. In many cases, such slots were created for replication to servers that no longer exist, or that have been down for a long time. If you drop a slot for a server -- 2.52.0
