mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-23 19:39:53 +08:00
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
This commit is contained in:
parent
c536da177c
commit
94e454cddf
@ -4574,10 +4574,10 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-enable-incrementalsort" xreflabel="enable_incrementalsort">
|
||||
<term><varname>enable_incrementalsort</varname> (<type>boolean</type>)
|
||||
<varlistentry id="guc-enable-incremental-sort" xreflabel="enable_incremental_sort">
|
||||
<term><varname>enable_incremental_sort</varname> (<type>boolean</type>)
|
||||
<indexterm>
|
||||
<primary><varname>enable_incrementalsort</varname> configuration parameter</primary>
|
||||
<primary><varname>enable_incremental_sort</varname> configuration parameter</primary>
|
||||
</indexterm>
|
||||
</term>
|
||||
<listitem>
|
||||
|
@ -588,7 +588,7 @@ Author: Tomas Vondra <tomas.vondra@postgresql.org>
|
||||
-->
|
||||
|
||||
<para>
|
||||
Implement <link linkend="guc-enable-incrementalsort">incremental
|
||||
Implement <link linkend="guc-enable-incremental-sort">incremental
|
||||
sorting</link> (James Coleman, Alexander Korotkov, Tomas Vondra)
|
||||
</para>
|
||||
|
||||
@ -596,7 +596,7 @@ Author: Tomas Vondra <tomas.vondra@postgresql.org>
|
||||
If a result is already sorted by several leading keys, this
|
||||
allows for batch sorting of additional trailing keys because the
|
||||
previous keys are already equal. This is controlled by <xref
|
||||
linkend="guc-enable-incrementalsort"/>.
|
||||
linkend="guc-enable-incremental-sort"/>.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
|
@ -2915,7 +2915,7 @@ generate_useful_gather_paths(PlannerInfo *root, RelOptInfo *rel, bool override_r
|
||||
* Consider incremental sort, but only when the subpath is already
|
||||
* partially sorted on a pathkey prefix.
|
||||
*/
|
||||
if (enable_incrementalsort && presorted_keys > 0)
|
||||
if (enable_incremental_sort && presorted_keys > 0)
|
||||
{
|
||||
Path *tmp;
|
||||
|
||||
|
@ -128,7 +128,7 @@ bool enable_indexonlyscan = true;
|
||||
bool enable_bitmapscan = true;
|
||||
bool enable_tidscan = true;
|
||||
bool enable_sort = true;
|
||||
bool enable_incrementalsort = true;
|
||||
bool enable_incremental_sort = true;
|
||||
bool enable_hashagg = true;
|
||||
bool hashagg_avoid_disk_plan = true;
|
||||
bool enable_nestloop = true;
|
||||
|
@ -5014,7 +5014,7 @@ create_ordered_paths(PlannerInfo *root,
|
||||
* presorted the path is. Additionally incremental sort may enable
|
||||
* a cheaper startup path to win out despite higher total cost.
|
||||
*/
|
||||
if (!enable_incrementalsort)
|
||||
if (!enable_incremental_sort)
|
||||
continue;
|
||||
|
||||
/* Likewise, if the path can't be used for incremental sort. */
|
||||
@ -5095,7 +5095,7 @@ create_ordered_paths(PlannerInfo *root,
|
||||
* sort_pathkeys because then we can't possibly have a presorted
|
||||
* prefix of the list without having the list be fully sorted.
|
||||
*/
|
||||
if (enable_incrementalsort && list_length(root->sort_pathkeys) > 1)
|
||||
if (enable_incremental_sort && list_length(root->sort_pathkeys) > 1)
|
||||
{
|
||||
ListCell *lc;
|
||||
|
||||
@ -6572,7 +6572,7 @@ add_paths_to_grouping_rel(PlannerInfo *root, RelOptInfo *input_rel,
|
||||
* when the path is not already sorted and when incremental sort
|
||||
* is enabled.
|
||||
*/
|
||||
if (is_sorted || !enable_incrementalsort)
|
||||
if (is_sorted || !enable_incremental_sort)
|
||||
continue;
|
||||
|
||||
/* 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,
|
||||
* when the path is not already sorted and when incremental
|
||||
* sort is enabled.
|
||||
*/
|
||||
if (is_sorted || !enable_incrementalsort)
|
||||
if (is_sorted || !enable_incremental_sort)
|
||||
continue;
|
||||
|
||||
/* Restore the input path (we might have added Sort on top). */
|
||||
@ -7022,7 +7022,7 @@ create_partial_grouping_paths(PlannerInfo *root,
|
||||
* group_pathkeys because then we can't possibly have a presorted
|
||||
* prefix of the list without having the list be fully sorted.
|
||||
*/
|
||||
if (enable_incrementalsort && list_length(root->group_pathkeys) > 1)
|
||||
if (enable_incremental_sort && list_length(root->group_pathkeys) > 1)
|
||||
{
|
||||
foreach(lc, input_rel->pathlist)
|
||||
{
|
||||
@ -7125,7 +7125,7 @@ create_partial_grouping_paths(PlannerInfo *root,
|
||||
* when the path is not already sorted and when incremental sort
|
||||
* is enabled.
|
||||
*/
|
||||
if (is_sorted || !enable_incrementalsort)
|
||||
if (is_sorted || !enable_incremental_sort)
|
||||
continue;
|
||||
|
||||
/* Restore the input path (we might have added Sort on top). */
|
||||
@ -7304,7 +7304,7 @@ gather_grouping_paths(PlannerInfo *root, RelOptInfo *rel)
|
||||
* group_pathkeys because then we can't possibly have a presorted prefix
|
||||
* of the list without having the list be fully sorted.
|
||||
*/
|
||||
if (!enable_incrementalsort || list_length(root->group_pathkeys) == 1)
|
||||
if (!enable_incremental_sort || list_length(root->group_pathkeys) == 1)
|
||||
return;
|
||||
|
||||
/* also consider incremental sort on partial paths, if enabled */
|
||||
|
@ -992,11 +992,11 @@ static struct config_bool ConfigureNamesBool[] =
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
{
|
||||
{"enable_incrementalsort", PGC_USERSET, QUERY_TUNING_METHOD,
|
||||
{"enable_incremental_sort", PGC_USERSET, QUERY_TUNING_METHOD,
|
||||
gettext_noop("Enables the planner's use of incremental sort steps."),
|
||||
NULL
|
||||
},
|
||||
&enable_incrementalsort,
|
||||
&enable_incremental_sort,
|
||||
true,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
@ -361,7 +361,7 @@
|
||||
#enable_parallel_append = on
|
||||
#enable_seqscan = on
|
||||
#enable_sort = on
|
||||
#enable_incrementalsort = on
|
||||
#enable_incremental_sort = on
|
||||
#enable_tidscan = on
|
||||
#enable_partitionwise_join = off
|
||||
#enable_partitionwise_aggregate = off
|
||||
|
@ -53,7 +53,7 @@ extern PGDLLIMPORT bool enable_indexonlyscan;
|
||||
extern PGDLLIMPORT bool enable_bitmapscan;
|
||||
extern PGDLLIMPORT bool enable_tidscan;
|
||||
extern PGDLLIMPORT bool enable_sort;
|
||||
extern PGDLLIMPORT bool enable_incrementalsort;
|
||||
extern PGDLLIMPORT bool enable_incremental_sort;
|
||||
extern PGDLLIMPORT bool enable_hashagg;
|
||||
extern PGDLLIMPORT bool hashagg_avoid_disk_plan;
|
||||
extern PGDLLIMPORT bool enable_nestloop;
|
||||
|
@ -1414,7 +1414,7 @@ create table t (a int, b int, c int);
|
||||
insert into t select mod(i,10),mod(i,10),i from generate_series(1,10000) s(i);
|
||||
create index on t (a);
|
||||
analyze t;
|
||||
set enable_incrementalsort = off;
|
||||
set enable_incremental_sort = off;
|
||||
explain (costs off) select a,b,sum(c) from t group by 1,2 order by 1,2,3 limit 1;
|
||||
QUERY PLAN
|
||||
------------------------------------------------------
|
||||
@ -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
|
||||
-> Parallel Seq Scan on t
|
||||
(10 rows)
|
||||
|
||||
set enable_incrementalsort = on;
|
||||
set enable_incremental_sort = on;
|
||||
explain (costs off) select a,b,sum(c) from t group by 1,2 order by 1,2,3 limit 1;
|
||||
QUERY PLAN
|
||||
----------------------------------------------------------------------
|
||||
|
@ -12,7 +12,7 @@ SET enable_partitionwise_join TO true;
|
||||
-- Disable parallel plans.
|
||||
SET max_parallel_workers_per_gather TO 0;
|
||||
-- Disable incremental sort, which can influence selected plans due to fuzz factor.
|
||||
SET enable_incrementalsort TO off;
|
||||
SET enable_incremental_sort TO off;
|
||||
--
|
||||
-- Tests for list partitioned tables.
|
||||
--
|
||||
|
@ -76,7 +76,7 @@ select name, setting from pg_settings where name like 'enable%';
|
||||
enable_gathermerge | on
|
||||
enable_hashagg | on
|
||||
enable_hashjoin | on
|
||||
enable_incrementalsort | on
|
||||
enable_incremental_sort | on
|
||||
enable_indexonlyscan | on
|
||||
enable_indexscan | on
|
||||
enable_material | on
|
||||
|
@ -210,10 +210,10 @@ insert into t select mod(i,10),mod(i,10),i from generate_series(1,10000) s(i);
|
||||
create index on t (a);
|
||||
analyze t;
|
||||
|
||||
set enable_incrementalsort = off;
|
||||
set enable_incremental_sort = off;
|
||||
explain (costs off) select a,b,sum(c) from t group by 1,2 order by 1,2,3 limit 1;
|
||||
|
||||
set enable_incrementalsort = on;
|
||||
set enable_incremental_sort = on;
|
||||
explain (costs off) select a,b,sum(c) from t group by 1,2 order by 1,2,3 limit 1;
|
||||
|
||||
-- Incremental sort vs. set operations with varno 0
|
||||
|
@ -13,7 +13,7 @@ SET enable_partitionwise_join TO true;
|
||||
-- Disable parallel plans.
|
||||
SET max_parallel_workers_per_gather TO 0;
|
||||
-- Disable incremental sort, which can influence selected plans due to fuzz factor.
|
||||
SET enable_incrementalsort TO off;
|
||||
SET enable_incremental_sort TO off;
|
||||
|
||||
--
|
||||
-- Tests for list partitioned tables.
|
||||
|
Loading…
Reference in New Issue
Block a user