Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e61225f

Browse files
committed
Rename enable_incrementalsort for clarity
Author: James Coleman <jtc331@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/df652910-e985-9547-152c-9d4357dc3979%402ndquadrant.com
1 parent 1d05627 commit e61225f

File tree

12 files changed

+23
-23
lines changed

12 files changed

+23
-23
lines changed

doc/src/sgml/config.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4574,10 +4574,10 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
45744574
</listitem>
45754575
</varlistentry>
45764576

4577-
<varlistentry id="guc-enable-incrementalsort" xreflabel="enable_incrementalsort">
4578-
<term><varname>enable_incrementalsort</varname> (<type>boolean</type>)
4577+
<varlistentry id="guc-enable-incremental-sort" xreflabel="enable_incremental_sort">
4578+
<term><varname>enable_incremental_sort</varname> (<type>boolean</type>)
45794579
<indexterm>
4580-
<primary><varname>enable_incrementalsort</varname> configuration parameter</primary>
4580+
<primary><varname>enable_incremental_sort</varname> configuration parameter</primary>
45814581
</indexterm>
45824582
</term>
45834583
<listitem>

src/backend/optimizer/path/allpaths.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2915,7 +2915,7 @@ generate_useful_gather_paths(PlannerInfo *root, RelOptInfo *rel, bool override_r
29152915
* Consider incremental sort, but only when the subpath is already
29162916
* partially sorted on a pathkey prefix.
29172917
*/
2918-
if (enable_incrementalsort && presorted_keys > 0)
2918+
if (enable_incremental_sort && presorted_keys > 0)
29192919
{
29202920
Path *tmp;
29212921

src/backend/optimizer/path/costsize.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ bool enable_indexonlyscan = true;
128128
bool enable_bitmapscan = true;
129129
bool enable_tidscan = true;
130130
bool enable_sort = true;
131-
bool enable_incrementalsort = true;
131+
bool enable_incremental_sort = true;
132132
bool enable_hashagg = true;
133133
bool hashagg_avoid_disk_plan = true;
134134
bool enable_nestloop = true;

src/backend/optimizer/plan/planner.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5014,7 +5014,7 @@ create_ordered_paths(PlannerInfo *root,
50145014
* presorted the path is. Additionally incremental sort may enable
50155015
* a cheaper startup path to win out despite higher total cost.
50165016
*/
5017-
if (!enable_incrementalsort)
5017+
if (!enable_incremental_sort)
50185018
continue;
50195019

50205020
/* Likewise, if the path can't be used for incremental sort. */
@@ -5095,7 +5095,7 @@ create_ordered_paths(PlannerInfo *root,
50955095
* sort_pathkeys because then we can't possibly have a presorted
50965096
* prefix of the list without having the list be fully sorted.
50975097
*/
5098-
if (enable_incrementalsort && list_length(root->sort_pathkeys) > 1)
5098+
if (enable_incremental_sort && list_length(root->sort_pathkeys) > 1)
50995099
{
51005100
ListCell *lc;
51015101

@@ -6572,7 +6572,7 @@ add_paths_to_grouping_rel(PlannerInfo *root, RelOptInfo *input_rel,
65726572
* when the path is not already sorted and when incremental sort
65736573
* is enabled.
65746574
*/
6575-
if (is_sorted || !enable_incrementalsort)
6575+
if (is_sorted || !enable_incremental_sort)
65766576
continue;
65776577

65786578
/* Restore the input path (we might have added Sort on top). */
@@ -6699,7 +6699,7 @@ add_paths_to_grouping_rel(PlannerInfo *root, RelOptInfo *input_rel,
66996699
* when the path is not already sorted and when incremental
67006700
* sort is enabled.
67016701
*/
6702-
if (is_sorted || !enable_incrementalsort)
6702+
if (is_sorted || !enable_incremental_sort)
67036703
continue;
67046704

67056705
/* Restore the input path (we might have added Sort on top). */
@@ -7022,7 +7022,7 @@ create_partial_grouping_paths(PlannerInfo *root,
70227022
* group_pathkeys because then we can't possibly have a presorted
70237023
* prefix of the list without having the list be fully sorted.
70247024
*/
7025-
if (enable_incrementalsort && list_length(root->group_pathkeys) > 1)
7025+
if (enable_incremental_sort && list_length(root->group_pathkeys) > 1)
70267026
{
70277027
foreach(lc, input_rel->pathlist)
70287028
{
@@ -7125,7 +7125,7 @@ create_partial_grouping_paths(PlannerInfo *root,
71257125
* when the path is not already sorted and when incremental sort
71267126
* is enabled.
71277127
*/
7128-
if (is_sorted || !enable_incrementalsort)
7128+
if (is_sorted || !enable_incremental_sort)
71297129
continue;
71307130

71317131
/* Restore the input path (we might have added Sort on top). */
@@ -7304,7 +7304,7 @@ gather_grouping_paths(PlannerInfo *root, RelOptInfo *rel)
73047304
* group_pathkeys because then we can't possibly have a presorted prefix
73057305
* of the list without having the list be fully sorted.
73067306
*/
7307-
if (!enable_incrementalsort || list_length(root->group_pathkeys) == 1)
7307+
if (!enable_incremental_sort || list_length(root->group_pathkeys) == 1)
73087308
return;
73097309

73107310
/* also consider incremental sort on partial paths, if enabled */

src/backend/utils/misc/guc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -983,11 +983,11 @@ static struct config_bool ConfigureNamesBool[] =
983983
NULL, NULL, NULL
984984
},
985985
{
986-
{"enable_incrementalsort", PGC_USERSET, QUERY_TUNING_METHOD,
986+
{"enable_incremental_sort", PGC_USERSET, QUERY_TUNING_METHOD,
987987
gettext_noop("Enables the planner's use of incremental sort steps."),
988988
NULL
989989
},
990-
&enable_incrementalsort,
990+
&enable_incremental_sort,
991991
true,
992992
NULL, NULL, NULL
993993
},

src/backend/utils/misc/postgresql.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@
361361
#enable_parallel_append = on
362362
#enable_seqscan = on
363363
#enable_sort = on
364-
#enable_incrementalsort = on
364+
#enable_incremental_sort = on
365365
#enable_tidscan = on
366366
#enable_partitionwise_join = off
367367
#enable_partitionwise_aggregate = off

src/include/optimizer/cost.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ extern PGDLLIMPORT bool enable_indexonlyscan;
5353
extern PGDLLIMPORT bool enable_bitmapscan;
5454
extern PGDLLIMPORT bool enable_tidscan;
5555
extern PGDLLIMPORT bool enable_sort;
56-
extern PGDLLIMPORT bool enable_incrementalsort;
56+
extern PGDLLIMPORT bool enable_incremental_sort;
5757
extern PGDLLIMPORT bool enable_hashagg;
5858
extern PGDLLIMPORT bool hashagg_avoid_disk_plan;
5959
extern PGDLLIMPORT bool enable_nestloop;

src/test/regress/expected/incremental_sort.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,7 @@ create table t (a int, b int, c int);
14141414
insert into t select mod(i,10),mod(i,10),i from generate_series(1,10000) s(i);
14151415
create index on t (a);
14161416
analyze t;
1417-
set enable_incrementalsort = off;
1417+
set enable_incremental_sort = off;
14181418
explain (costs off) select a,b,sum(c) from t group by 1,2 order by 1,2,3 limit 1;
14191419
QUERY PLAN
14201420
------------------------------------------------------
@@ -1430,7 +1430,7 @@ explain (costs off) select a,b,sum(c) from t group by 1,2 order by 1,2,3 limit 1
14301430
-> Parallel Seq Scan on t
14311431
(10 rows)
14321432

1433-
set enable_incrementalsort = on;
1433+
set enable_incremental_sort = on;
14341434
explain (costs off) select a,b,sum(c) from t group by 1,2 order by 1,2,3 limit 1;
14351435
QUERY PLAN
14361436
----------------------------------------------------------------------

src/test/regress/expected/partition_aggregate.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ SET enable_partitionwise_join TO true;
1212
-- Disable parallel plans.
1313
SET max_parallel_workers_per_gather TO 0;
1414
-- Disable incremental sort, which can influence selected plans due to fuzz factor.
15-
SET enable_incrementalsort TO off;
15+
SET enable_incremental_sort TO off;
1616
--
1717
-- Tests for list partitioned tables.
1818
--

src/test/regress/expected/sysviews.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ select name, setting from pg_settings where name like 'enable%';
7676
enable_gathermerge | on
7777
enable_hashagg | on
7878
enable_hashjoin | on
79-
enable_incrementalsort | on
79+
enable_incremental_sort | on
8080
enable_indexonlyscan | on
8181
enable_indexscan | on
8282
enable_material | on

src/test/regress/sql/incremental_sort.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ insert into t select mod(i,10),mod(i,10),i from generate_series(1,10000) s(i);
210210
create index on t (a);
211211
analyze t;
212212

213-
set enable_incrementalsort = off;
213+
set enable_incremental_sort = off;
214214
explain (costs off) select a,b,sum(c) from t group by 1,2 order by 1,2,3 limit 1;
215215

216-
set enable_incrementalsort = on;
216+
set enable_incremental_sort = on;
217217
explain (costs off) select a,b,sum(c) from t group by 1,2 order by 1,2,3 limit 1;
218218

219219
-- Incremental sort vs. set operations with varno 0

src/test/regress/sql/partition_aggregate.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SET enable_partitionwise_join TO true;
1313
-- Disable parallel plans.
1414
SET max_parallel_workers_per_gather TO 0;
1515
-- Disable incremental sort, which can influence selected plans due to fuzz factor.
16-
SET enable_incrementalsort TO off;
16+
SET enable_incremental_sort TO off;
1717

1818
--
1919
-- Tests for list partitioned tables.

0 commit comments

Comments
 (0)