mirror of https://github.com/citusdata/citus.git
Update sql query
parent
cfd914ac4a
commit
c35d9fd10f
|
@ -188,9 +188,10 @@ CREATE TABLE cluster_management_test_colocated (col_1 text, col_2 int);
|
||||||
SELECT create_distributed_table('cluster_management_test_colocated', 'col_1', 'hash', colocate_with => 'cluster_management_test');
|
SELECT create_distributed_table('cluster_management_test_colocated', 'col_1', 'hash', colocate_with => 'cluster_management_test');
|
||||||
|
|
||||||
-- Check that colocated shards don't get created for shards that are to be deleted
|
-- Check that colocated shards don't get created for shards that are to be deleted
|
||||||
SELECT logicalrelid, shardid, shardstate, nodename, nodeport
|
SELECT logicalrelid, pgs.shardid, pgp.shardstate, nodename, nodeport
|
||||||
FROM pg_dist_shard_placement
|
FROM pg_dist_shard_placement pgp
|
||||||
INNER JOIN pg_dist_shard USING (shardid)
|
INNER JOIN pg_dist_shard pgs
|
||||||
|
ON pgp.shardid = pgs.shardid
|
||||||
ORDER BY shardstate, shardid;
|
ORDER BY shardstate, shardid;
|
||||||
|
|
||||||
-- clean-up
|
-- clean-up
|
||||||
|
@ -473,10 +474,11 @@ SELECT create_distributed_table('test_dist_non_colocated', 'x', colocate_with =>
|
||||||
-- colocated tables should not be placed on nodedes that were switched to
|
-- colocated tables should not be placed on nodedes that were switched to
|
||||||
-- shouldhaveshards true
|
-- shouldhaveshards true
|
||||||
SELECT nodeport, count(*)
|
SELECT nodeport, count(*)
|
||||||
FROM pg_dist_shard JOIN pg_dist_shard_placement USING (shardid)
|
FROM pg_dist_shard_placement pgp
|
||||||
|
INNER JOIN pg_dist_shard pgs
|
||||||
|
ON pgp.shardid = pgs.shardid
|
||||||
WHERE logicalrelid = 'test_dist_colocated'::regclass GROUP BY nodeport ORDER BY nodeport;
|
WHERE logicalrelid = 'test_dist_colocated'::regclass GROUP BY nodeport ORDER BY nodeport;
|
||||||
|
|
||||||
|
|
||||||
-- non colocated tables should be placed on nodedes that were switched to
|
-- non colocated tables should be placed on nodedes that were switched to
|
||||||
-- shouldhaveshards true
|
-- shouldhaveshards true
|
||||||
SELECT nodeport, count(*)
|
SELECT nodeport, count(*)
|
||||||
|
|
Loading…
Reference in New Issue