citus/src/test/regress/expected/add_coordinator.out

35 lines
1.4 KiB
Plaintext

--
-- ADD_COORDINATOR
--
-- node trying to add itself without specifying groupid => 0 should error out
-- first remove the coordinator to for testing master_add_node for coordinator
SELECT master_remove_node('localhost', :master_port);
master_remove_node
---------------------------------------------------------------------
(1 row)
SELECT master_add_node('localhost', :master_port);
ERROR: Node cannot add itself as a worker.
HINT: Add the node as a coordinator by using: SELECT citus_set_coordinator_host('localhost', 57636);
SELECT master_add_node('localhost', :master_port, groupid => 0) AS master_nodeid \gset
NOTICE: localhost:xxxxx is the coordinator and already contains metadata, skipping syncing the metadata
-- adding the same node again should return the existing nodeid
SELECT master_add_node('localhost', :master_port, groupid => 0) = :master_nodeid;
?column?
---------------------------------------------------------------------
t
(1 row)
-- adding another node with groupid=0 should error out
SELECT master_add_node('localhost', 12345, groupid => 0) = :master_nodeid;
ERROR: group 0 already has a primary node
-- start_metadata_sync_to_node() for coordinator should raise a notice
SELECT start_metadata_sync_to_node('localhost', :master_port);
NOTICE: localhost:xxxxx is the coordinator and already contains metadata, skipping syncing the metadata
start_metadata_sync_to_node
---------------------------------------------------------------------
(1 row)