# Switchover of the Primary Node

To switchover to a new primary node with ColumnStore, perform the following procedure.

## Performing Switchover in MaxScale

The primary node can be switched in MaxScale using [MaxScale's REST API](/docs/maxscale/reference/maxscale-rest-api.md):

* Use [MaxCtrl](/docs/maxscale/maxscale-management/administrative-tools-for-mariadb-maxscale-maxctrl.md) or another supported REST client.
* Call a module command using the `call command` command.
* As the first argument, provide the name for the module, which is [mariadbmon](/docs/maxscale/reference/maxscale-monitors/mariadb-monitor.md).
* As the second argument, provide the module command, which is `switchover` .
* As the third argument, provide the name of the monitor.

For example:

```bash
maxctrl call command \
   mariadbmon \
   switchover \
   mcs_monitor
```

With the above syntax, MaxScale will choose the most up-to-date replica to be the new primary.

If you want to manually select a new primary, provide the server name of the new primary as the fourth argument:

```bash
maxctrl call command \
   mariadbmon \
   switchover \
   mcs_monitor \
   mcs2
```

## Checking the Replication Status with MaxScale

MaxScale is capable of checking the status of [MariaDB Replication](/docs/server/ha-and-performance/standard-replication.md) using [MaxScale's REST API](/docs/maxscale/reference/maxscale-rest-api.md):

* List the servers using the `list servers` command, like this:

```bash
maxctrl list servers
```

If switchover was properly performed, the `State` column of the new primary shows `Master, Running`.

<sub>*This page is: Copyright © 2025 MariaDB. All rights reserved.*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/analytics/mariadb-columnstore/management/node-maintenance-for-mariadb-enterprise-columnstore/switchover-primary-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
