diff --git a/src/backend/distributed/sql/udfs/citus_shards/12.2-1.sql b/src/backend/distributed/sql/udfs/citus_shards/12.2-1.sql index b19554ed9..c5118ff09 100644 --- a/src/backend/distributed/sql/udfs/citus_shards/12.2-1.sql +++ b/src/backend/distributed/sql/udfs/citus_shards/12.2-1.sql @@ -15,7 +15,7 @@ SELECT CASE WHEN NOT pg_dist_shard.needsisolatednode THEN false ELSE - -- own_node = true if the node doesn't have any other shards except the ones that are colocated with this shard + -- has_separate_node = true if the node doesn't have any other shards except the ones that are colocated with this shard NOT EXISTS ( -- get all the distributed table shards that are placed on the same node as this shard SELECT pds1.shardid @@ -32,7 +32,7 @@ SELECT WHERE pdp1.colocationid = pg_dist_partition.colocationid AND ((pds1.shardminvalue IS NULL AND pg_dist_shard.shardminvalue IS NULL) OR (pds1.shardminvalue = pg_dist_shard.shardminvalue)) ) - END AS own_node + END AS has_separate_node FROM pg_dist_shard JOIN diff --git a/src/backend/distributed/sql/udfs/citus_shards/latest.sql b/src/backend/distributed/sql/udfs/citus_shards/latest.sql index b19554ed9..c5118ff09 100644 --- a/src/backend/distributed/sql/udfs/citus_shards/latest.sql +++ b/src/backend/distributed/sql/udfs/citus_shards/latest.sql @@ -15,7 +15,7 @@ SELECT CASE WHEN NOT pg_dist_shard.needsisolatednode THEN false ELSE - -- own_node = true if the node doesn't have any other shards except the ones that are colocated with this shard + -- has_separate_node = true if the node doesn't have any other shards except the ones that are colocated with this shard NOT EXISTS ( -- get all the distributed table shards that are placed on the same node as this shard SELECT pds1.shardid @@ -32,7 +32,7 @@ SELECT WHERE pdp1.colocationid = pg_dist_partition.colocationid AND ((pds1.shardminvalue IS NULL AND pg_dist_shard.shardminvalue IS NULL) OR (pds1.shardminvalue = pg_dist_shard.shardminvalue)) ) - END AS own_node + END AS has_separate_node FROM pg_dist_shard JOIN diff --git a/src/test/regress/expected/isolate_placement.out b/src/test/regress/expected/isolate_placement.out index 4c4a2a096..b4a060164 100644 --- a/src/test/regress/expected/isolate_placement.out +++ b/src/test/regress/expected/isolate_placement.out @@ -18,7 +18,7 @@ AS $func$ DECLARE v_result boolean; BEGIN - SELECT bool_and(own_node) INTO v_result + SELECT bool_and(has_separate_node) INTO v_result FROM citus_shards JOIN ( SELECT shardids FROM public.get_enumerated_shard_groups(qualified_table_name) WHERE shardgroupindex = shard_group_index @@ -1185,7 +1185,7 @@ SELECT public.verify_placements_in_shard_group_isolated('isolate_placement.dist_ SELECT DISTINCT(table_name::regclass::text) FROM citus_shards JOIN pg_class ON (oid = table_name) -WHERE relnamespace = 'isolate_placement'::regnamespace AND own_node +WHERE relnamespace = 'isolate_placement'::regnamespace AND has_separate_node ORDER BY 1; table_name --------------------------------------------------------------------- @@ -1196,7 +1196,7 @@ ORDER BY 1; dist_post_concurrently_colocated (5 rows) -SELECT bool_or(own_node) = false +SELECT bool_or(has_separate_node) = false FROM citus_shards JOIN ( SELECT unnest(shardids) shardid diff --git a/src/test/regress/sql/isolate_placement.sql b/src/test/regress/sql/isolate_placement.sql index 6b89529cb..c9376b77f 100644 --- a/src/test/regress/sql/isolate_placement.sql +++ b/src/test/regress/sql/isolate_placement.sql @@ -20,7 +20,7 @@ AS $func$ DECLARE v_result boolean; BEGIN - SELECT bool_and(own_node) INTO v_result + SELECT bool_and(has_separate_node) INTO v_result FROM citus_shards JOIN ( SELECT shardids FROM public.get_enumerated_shard_groups(qualified_table_name) WHERE shardgroupindex = shard_group_index @@ -658,10 +658,10 @@ SELECT public.verify_placements_in_shard_group_isolated('isolate_placement.dist_ SELECT DISTINCT(table_name::regclass::text) FROM citus_shards JOIN pg_class ON (oid = table_name) -WHERE relnamespace = 'isolate_placement'::regnamespace AND own_node +WHERE relnamespace = 'isolate_placement'::regnamespace AND has_separate_node ORDER BY 1; -SELECT bool_or(own_node) = false +SELECT bool_or(has_separate_node) = false FROM citus_shards JOIN ( SELECT unnest(shardids) shardid