pgsql: doc: Clarify scan method selection for REPACK and CLUSTER

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: doc: Clarify scan method selection for REPACK and CLUSTER
Date: 2026-11-24 02:36:25
Message-ID: E1xVgOO-000000005iB-33Xi@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

doc: Clarify scan method selection for REPACK and CLUSTER

The documentation described using enable_sort to avoid sorting during
clustering, but did not explain how enable_indexscan and enable_seqscan
affected that choice. This left the conditions for avoiding sorting
unclear.

Document these settings together with the scan method selection rules
for B-tree indexes. Explain that enable_indexscan = off forces a
sequential scan and sort regardless of the other two settings.
Otherwise, disabling enable_sort or enable_seqscan favors an index
scan, provided the index is usable.

Suggested-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Author: Raja Sai Pranav <rajasaipranav0(at)gmail(dot)com>
Reviewed-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAHGQGwGhA-tzFGPV+oBQF1jK==tSkmwM=z_z9p+bhb-yYCAzLA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f5ead259821bb5a10d07c0e9b4f7016706d787ee

Modified Files
--------------
doc/src/sgml/ref/repack.sgml | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2026-11-24 03:27:43 pgsql: Allocate pgstats entry body before insert into shared hashtable
Previous Message Masahiko Sawada 2026-11-23 23:11:04 pgsql: Add an xid argument to the logical decoding message callbacks.