Re: EXPLAIN IndexOnlyScan shows disabled when enable_indexonlyscan=on

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: Melanie Plageman <melanieplageman@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>, Robert Haas <robertmhaas@gmail.com>
Date: 2024-10-28T22:54:01Z
Lists: pgsql-hackers

Attachments

On Wed, 23 Oct 2024 at 13:51, David G. Johnston
<david.g.johnston@gmail.com> wrote:
> Went with a slightly different wording that seems to flow better with the xrefs I added between the two options.

-        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

I'm concerned about the wording "all index-scan related".  It's not
that clear if that would include Bitmap Index Scans or not. I think
it's better to explicitly mention index-only-scans to make it clear
which nodes are affected.

+        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>.

I wondered if it's better to reference the enable_indexonlyscan GUC
here rather than document what enable_indexonlyscan does from the
enable_indexscan docs. Maybe just a "Also see enable_indexonlyscans."
could be added?

-        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>.

Could we just add "The <xref linkend="guc-enable-indexscan"/> setting
must also be enabled to have the query planner consider
index-only-scans"?

I've attached that in patch form.

David

Commits

  1. Doc: clarify enable_indexscan=off also disabled Index Only Scans