From dab16be2832242db241584e637a188b0ae376911 Mon Sep 17 00:00:00 2001 From: Jelte Fennema Date: Fri, 27 Sep 2019 17:21:36 +0200 Subject: [PATCH] Set default threshold on get_rebalance_table_shards_plan to 0, like rebalance_table_shards (#3039) In this PR the default `threshold` of `rebalance_table_shards` was set to 0: https://github.com/citusdata/shard_rebalancer/pull/73 However, the default for get_rebalance_table_shards_plan was not updated. This can cause the confusing situation where the actual steps run by `rebalance_table_shards` are not the same as the ones returned by `get_rebalance_table_shards_plan`. --- .../sql/udfs/get_rebalance_table_shards_plan/9.0-1.sql | 2 +- .../sql/udfs/get_rebalance_table_shards_plan/latest.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/distributed/sql/udfs/get_rebalance_table_shards_plan/9.0-1.sql b/src/backend/distributed/sql/udfs/get_rebalance_table_shards_plan/9.0-1.sql index 9c055a7cc..1079be2b4 100644 --- a/src/backend/distributed/sql/udfs/get_rebalance_table_shards_plan/9.0-1.sql +++ b/src/backend/distributed/sql/udfs/get_rebalance_table_shards_plan/9.0-1.sql @@ -5,7 +5,7 @@ -- CREATE OR REPLACE FUNCTION pg_catalog.get_rebalance_table_shards_plan( relation regclass, - threshold float4 default 0.1, + threshold float4 default 0, max_shard_moves int default 1000000, excluded_shard_list bigint[] default '{}') RETURNS TABLE (table_name regclass, diff --git a/src/backend/distributed/sql/udfs/get_rebalance_table_shards_plan/latest.sql b/src/backend/distributed/sql/udfs/get_rebalance_table_shards_plan/latest.sql index 9c055a7cc..1079be2b4 100644 --- a/src/backend/distributed/sql/udfs/get_rebalance_table_shards_plan/latest.sql +++ b/src/backend/distributed/sql/udfs/get_rebalance_table_shards_plan/latest.sql @@ -5,7 +5,7 @@ -- CREATE OR REPLACE FUNCTION pg_catalog.get_rebalance_table_shards_plan( relation regclass, - threshold float4 default 0.1, + threshold float4 default 0, max_shard_moves int default 1000000, excluded_shard_list bigint[] default '{}') RETURNS TABLE (table_name regclass,