v1-0001-doc-Cross-reference-enable_indexscan-and-enable_inde.patch

text/x-patch

Filename: v1-0001-doc-Cross-reference-enable_indexscan-and-enable_inde.patch
Type: text/x-patch
Part: 0
Message: Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

Patch

Format: format-patch
Series: patch v1-0001
Subject: doc: Cross reference enable_indexscan and enable_indexonlyscan
File+
doc/src/sgml/config.sgml 7 4
From 8b9be4096352088ea22f114e68041fd09ee6e28c Mon Sep 17 00:00:00 2001
From: "David G. Johnston" <David.G.Johnston@Gmail.com>
Date: Tue, 22 Oct 2024 17:25:27 -0700
Subject: [PATCH] doc: Cross reference enable_indexscan and
 enable_indexonlyscan

Document that enable_indexscan controls the inclusion of all (normal
and index-only) index scan plan node types.  Note that index-only scans
can be independently disabled.

Note the implication of this in enable_indexonlyscan, that a setting of
"on" is ignored when all index scans types are disabled.

Left unwritten is the absence of a symmetric option to exclude normal
index scans while allowing index-only scans.
---
 doc/src/sgml/config.sgml | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 934ef5e469..04cbe7ac34 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -5415,8 +5415,10 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
       </term>
       <listitem>
        <para>
-        Enables or disables the query planner's use of index-scan plan
-        types. The default is <literal>on</literal>.
+        Enables or disables the query planner's use of all index-scan related plan
+        types. The default is <literal>on</literal>. The index-only-scan plan types
+        can be independently disabled by setting <xref linkend="guc-enable-indexonlyscan"/>
+        to <literal>off</literal>.
        </para>
       </listitem>
      </varlistentry>
@@ -5429,9 +5431,10 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
       </term>
       <listitem>
        <para>
-        Enables or disables the query planner's use of index-only-scan plan
+        Set to <literal>off</literal> to disable the query planner's use of index-only-scan plan
         types (see <xref linkend="indexes-index-only-scans"/>).
-        The default is <literal>on</literal>.
+        The default is <literal>on</literal>. However, this setting has no effect if
+        <xref linkend="guc-enable-indexscan"/> is set to <literal>off</literal>.
        </para>
       </listitem>
      </varlistentry>
-- 
2.34.1