# PROMOTE AGGREGATOR … TO MASTER

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.
* This command is not supported when the `consensus_enabled` variable is on. Once high availability for the master aggregator (HA for MA) is enabled this command cannot be used.
* `enable_query_forwarding` must be set to `ON` for DDL and DML queries to continue to run while `PROMOTE AGGREGATOR` executes. See [Sync Variables Lists](https://docs.singlestore.com/db/v9.1/reference/configuration-reference/engine-variables/list-of-engine-variables/#sync-variables-lists.md) for more information on this variable.
* If there is permanent loss of the master aggregator, use [AGGREGATOR SET AS MASTER](https://docs.singlestore.com/db/v9.1/reference/sql-reference/cluster-management-commands/aggregator-set-as-master.md) instead of `PROMOTE AGGREGATOR ... TO MASTER`.
* This command can be run on a master or child aggregator node (see [Node Requirements for SingleStore Commands](https://docs.singlestore.com/db/v9.1/reference/sql-reference/cluster-management-commands.md)).
* This command causes implicit commits. Refer to [COMMIT](https://docs.singlestore.com/db/v9.1/reference/sql-reference/data-manipulation-language-dml/commit.md) for more information.
* Refer to the [Permissions Matrix](https://docs.singlestore.com/db/v9.1/reference/sql-reference/security-management-commands/permissions-matrix.md) for the required permissions.

## Permissions

The specified user account must have full permissions on the node to execute this command, namely the cluster privilege. For more information, see [Permissions Matrix](https://docs.singlestore.com/db/v9.1/reference/sql-reference/security-management-commands/permissions-matrix.md).

## Example

```sql

PROMOTE AGGREGATOR '127.0.0.1':3307 TO MASTER;

```

```output

Query OK, 0 rows affected (2.971 sec)

```

**Related Topics**

* [Aggregator](https://docs.singlestore.com/db/v9.1/introduction/distributed-architecture/cluster-components/#UUID-5ab4d9d6-9704-50a3-e36b-47484a35ad81.md)
* [AGGREGATOR SET AS MASTER](https://docs.singlestore.com/db/v9.1/reference/sql-reference/cluster-management-commands/aggregator-set-as-master.md)

***

Modified at: November 29, 2024

Source: [/db/v9.1/reference/sql-reference/cluster-management-commands/promote-aggregator-to-master/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/cluster-management-commands/promote-aggregator-to-master/)

(An index of the documentation is available at /llms.txt)
