From a49b0c462344b18d1cdf227714b642a8d5556ac1 Mon Sep 17 00:00:00 2001
From: James Coleman <jtc331@gmail.com>
Date: Wed, 25 Mar 2020 08:36:24 -0400
Subject: [PATCH v42 03/12] update docs

---
 doc/src/sgml/config.sgml                      | 12 ++++++++++--
 src/backend/utils/misc/postgresql.conf.sample |  1 +
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index fe77f8eb4c..47ceea43d9 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -4550,8 +4550,16 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
       </term>
       <listitem>
        <para>
-        Enables or disables the query planner's use of incremental sort
-        steps. The default is <literal>on</literal>.
+        Enables or disables the query planner's use of incremental sort, which
+        allows the planner to take advantage of data presorted on columns
+        <literal>1..m</literal> when an ordering on columns <literal>1..n</literal>
+        (where <literal>m < n</literal>) is required. Compared to regular sorts,
+        incremental sort allows returning tuples before the entire result set
+        has been sorted, particularly enabling optimizations with
+        <literal>LIMIT</literal> queries. It may also reduce memory usage and
+        the likelihood of spilling sorts to disk, but comes at the cost of
+        increased overhead splitting the result set into multiple sorting
+        batches. The default is <literal>on</literal>.
        </para>
       </listitem>
      </varlistentry>
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index aa44f0c9bf..bc2c2dbb1b 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -359,6 +359,7 @@
 #enable_parallel_append = on
 #enable_seqscan = on
 #enable_sort = on
+#enable_incrementalsort = on
 #enable_tidscan = on
 #enable_partitionwise_join = off
 #enable_partitionwise_aggregate = off
-- 
2.17.1

