Remove hint message from master_remove_node UDF

Hint about master_disable_node  was giving wrong
impression to users. Removal is better than keeping it.
pull/1143/head
Murat Tuncer 2017-01-18 16:42:16 +03:00 committed by Jason Petersen
parent c0f1a7609f
commit c12bd7b75e
No known key found for this signature in database
GPG Key ID: 9F1D3510D110ABA9
2 changed files with 1 additions and 4 deletions

View File

@ -411,8 +411,7 @@ RemoveNodeFromCluster(char *nodeName, int32 nodePort, bool forceRemove)
else else
{ {
ereport(ERROR, (errmsg("you cannot remove a node which has active " ereport(ERROR, (errmsg("you cannot remove a node which has active "
"shard placements"), "shard placements")));
errhint("Consider using master_disable_node.")));
} }
} }

View File

@ -113,7 +113,6 @@ SELECT shardid, shardstate, nodename, nodeport FROM pg_dist_shard_placement WHER
-- try to remove a node with active placements and see that node removal is failed -- try to remove a node with active placements and see that node removal is failed
SELECT master_remove_node('localhost', :worker_2_port); SELECT master_remove_node('localhost', :worker_2_port);
ERROR: you cannot remove a node which has active shard placements ERROR: you cannot remove a node which has active shard placements
HINT: Consider using master_disable_node.
SELECT master_get_active_worker_nodes(); SELECT master_get_active_worker_nodes();
master_get_active_worker_nodes master_get_active_worker_nodes
-------------------------------- --------------------------------
@ -148,7 +147,6 @@ SELECT master_add_node('localhost', :worker_2_port);
-- try to remove a node with active placements and see that node removal is failed -- try to remove a node with active placements and see that node removal is failed
SELECT master_remove_node('localhost', :worker_2_port); SELECT master_remove_node('localhost', :worker_2_port);
ERROR: you cannot remove a node which has active shard placements ERROR: you cannot remove a node which has active shard placements
HINT: Consider using master_disable_node.
-- mark all placements in the candidate node as inactive -- mark all placements in the candidate node as inactive
UPDATE pg_dist_shard_placement SET shardstate=3 WHERE nodeport=:worker_2_port; UPDATE pg_dist_shard_placement SET shardstate=3 WHERE nodeport=:worker_2_port;
SELECT shardid, shardstate, nodename, nodeport FROM pg_dist_shard_placement WHERE nodeport=:worker_2_port; SELECT shardid, shardstate, nodename, nodeport FROM pg_dist_shard_placement WHERE nodeport=:worker_2_port;