doc: List all the possible values of pg_stat_wal_receiver.status
authorMichael Paquier <michael@paquier.xyz>
Thu, 22 Jan 2026 08:03:21 +0000 (17:03 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 22 Jan 2026 08:03:21 +0000 (17:03 +0900)
The possible values of pg_stat_wal_receiver.status have never been
documented.  Note that the status "stopped" will never show up in this
view, hence there is no need to document it.

Issue noticed while discussing a patch that aims to add a new status to
WAL receiver.

Author: Xuneng Zhou <xunengzhou@gmail.com>
Discussion: https://postgr.es/m/CABPTF7X_Jgmyk1FBVNf3tyAOKqU55LLpLMzWkGtEAb_jQWVN=g@mail.gmail.com

doc/src/sgml/monitoring.sgml

index 817fd9f4ca7af0868c9f30403fc3043e7e9a9d44..88450facebd130bc9239ffe18a5e94b30aba721d 100644 (file)
@@ -1737,7 +1737,38 @@ description | Waiting for a newly initialized WAL file to reach durable storage
        <structfield>status</structfield> <type>text</type>
       </para>
       <para>
-       Activity status of the WAL receiver process
+       Activity status of the WAL receiver process. Possible values are:
+       <itemizedlist>
+        <listitem>
+         <para>
+          <literal>restarting</literal>: WAL receiver has been asked to
+          restart streaming.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>starting</literal>: WAL receiver process has been launched
+          but is not yet initialized.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>stopping</literal>: WAL receiver has been requested to
+          stop.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>streaming</literal>: WAL receiver is streaming WAL data.
+         </para>
+        </listitem>
+        <listitem>
+         <para>
+          <literal>waiting</literal>: WAL receiver has stopped streaming and
+          is waiting for new instructions from the startup process.
+         </para>
+        </listitem>
+       </itemizedlist>
       </para></entry>
      </row>