PROMOTE AGGREGATOR … TO MASTER
On this page
This command promotes a child aggregator node to master, while demoting the current master to child.
This is useful for host maintenance that requires a restart of the master aggregator, or replacement of the old master aggregator with new hardware.
Syntax
PROMOTE AGGREGATOR '<host>':<port> TO MASTER;
Arguments
-
<host>
is the host of the child aggregator to be promoted. -
<port>
is the port of the child aggregator to be promoted.
Remarks
-
The node to be promoted must already be a child aggregator in the cluster and must currently be online.
-
enable_
must be set toquery_ forwarding ON
for DDL and DML queries to continue to run whilePROMOTE AGGREGATOR
executes.See Sync Variables Lists for more information on this variable. -
If there is permanent loss of the master aggregator, use AGGREGATOR SET AS MASTER instead of
PROMOTE AGGREGATOR .
.. . TO MASTER -
This command can be run on a master or child aggregator node (see Node Requirements for SingleStore Commands).
-
This command causes implicit commits.
Refer to COMMIT for more information. -
Refer to the Permission Matrix for the required permission.
Permissions
The specified user account must have full permissions on the node to execute this command, namely the cluster privilege.
Example
PROMOTE AGGREGATOR '127.0.0.1':3307 TO MASTER;
Query OK, 0 rows affected (2.971 sec)
Related Topics
Last modified: January 9, 2023