From bacd104dfdc1aef9bbf35f27c324983c5f348543 Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Wed, 21 Oct 2020 09:05:01 +0530
Subject: [PATCH v1] Update description of spilled counters in
 pg_stat_replication_slots view.

---
 doc/src/sgml/monitoring.sgml | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 66566765f0..ea874126f0 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -2603,9 +2603,9 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
        </para>
        <para>
         Number of transactions spilled to disk after the memory used by
-        logical decoding exceeds <literal>logical_decoding_work_mem</literal>. The
-        counter gets incremented both for toplevel transactions and
-        subtransactions.
+        logical decoding of changes from WAL for this exceeds
+        <literal>logical_decoding_work_mem</literal>. The counter gets
+        incremented both for toplevel transactions and subtransactions.
       </para></entry>
      </row>
 
@@ -2614,9 +2614,12 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
         <structfield>spill_count</structfield> <type>bigint</type>
        </para>
        <para>
-        Number of times transactions were spilled to disk. Transactions
+        Number of times transactions were spilled to disk while performing
+        decoding of changes from WAL for this slot. Transactions
         may get spilled repeatedly, and this counter gets incremented on every
-        such invocation.
+        such invocation. This can be used to gauge the I/O occurred during
+        logical decoding and can be used to tune
+        <literal>logical_decoding_work_mem</literal>.
       </para></entry>
      </row>
 
-- 
2.28.0.windows.1

