From 08b4dc8bf7aa2d91dbb7b9ee6123133a2bbbeba5 Mon Sep 17 00:00:00 2001
From: Sai Pranav <rajasaipranav0@gmail.com>
Date: Sat, 21 Nov 2026 06:23:54 +0000
Subject: [PATCH v1] doc: Mention enable_indexscan and enable_seqscan in REPACK
 resource notes

The notes said only that enable_sort can stop REPACK USING INDEX (and so
CLUSTER) from choosing a sequential scan and sort.  enable_indexscan and
enable_seqscan also affect that choice, so say how.

Suggested by Fujii Masao.

Discussion: https://postgr.es/m/19881-cc00ace224a1fa3e@postgresql.org
---
 doc/src/sgml/ref/repack.sgml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/doc/src/sgml/ref/repack.sgml b/doc/src/sgml/ref/repack.sgml
index 4cd3cfa0b1..58ab8ac391 100644
--- a/doc/src/sgml/ref/repack.sgml
+++ b/doc/src/sgml/ref/repack.sgml
@@ -294,7 +294,11 @@ REPACK [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] USING
     requirement is intolerable, you can disable this choice by temporarily
     setting <xref linkend="guc-enable-sort"/> to <literal>off</literal>; or
     omitting <literal>USING INDEX</literal> if the table doesn't need to be
-    reordered.
+    reordered.  The choice also follows <xref linkend="guc-enable-indexscan"/>
+    and <xref linkend="guc-enable-seqscan"/>: with
+    <varname>enable_indexscan</varname> off, a sequential scan and sort is
+    always used, and with <varname>enable_seqscan</varname> off, the index
+    scan is preferred.
    </para>
 
    <para>
-- 
2.50.1 (Apple Git-155)

