From 44cf90c5b06fb21c2c4d379568b9fe86a54f1530 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sun, 15 Mar 2020 13:06:02 -0500
Subject: [PATCH] fix: vacuum_cleanup_index_scale_factor

---
 doc/src/sgml/config.sgml | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 9851ca68b4..5da2e705b9 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -8522,24 +8522,26 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
       </term>
       <listitem>
        <para>
-        Specifies the fraction of the total number of heap tuples counted in
-        the previous statistics collection that can be inserted without
-        incurring an index scan at the <command>VACUUM</command> cleanup stage.
+        Specifies a multiplier of the total number of heap tuples that can be
+        inserted before incurring an index scan at the <command>VACUUM</command>
+        cleanup stage.
         This setting currently applies to B-tree indexes only.
        </para>
 
        <para>
-        If no tuples were deleted from the heap, B-tree indexes are still
-        scanned at the <command>VACUUM</command> cleanup stage when the
-        index's statistics are stale.  Index statistics are considered
-        stale if the number of newly inserted tuples exceeds the
-        <varname>vacuum_cleanup_index_scale_factor</varname>
-        fraction of the total number of heap tuples detected by the previous
-        statistics collection. The total number of heap tuples is stored in
+        During <command>VACUUM</command>, if there are no dead tuples found while
+        scanning the heap, then the index vacuum phase is skipped.
+        However, indexes might still be scanned during the cleanup phase.  Setting this
+        parameter enables the possibility to skip scanning indexes during cleanup.
+        Indexes will always be scanned when their statistics are stale.
+        Index statistics are considered to be stale if the number of newly
+        inserted tuples exceeds the <varname>vacuum_cleanup_index_scale_factor</varname>
+        multiplier of the total number of heap tuples at the time of the previous
+        vacuum cleanup. The total number of heap tuples is stored in
         the index meta-page. Note that the meta-page does not include this data
         until <command>VACUUM</command> finds no dead tuples, so B-tree index
-        scan at the cleanup stage can only be skipped if the second and
-        subsequent <command>VACUUM</command> cycles detect no dead tuples.
+        scans at the cleanup stage cannot be skipped until after a vacuum cycle
+        which detects no dead tuples.
        </para>
 
        <para>
-- 
2.17.0

