MariaDB Replication with MariaDB Xpand

MariaDB Replication can be used with MariaDB Xpand, but it requires some special configuration.

This documentation applies to both Xpand topologies.

Replication to Synchronize Schemas

When using the Xpand Storage Engine topology, MariaDB Xpand automatically synchronizes the schema and data on all Xpand nodes, but ES nodes do not synchronize database object to each other or from Xpand nodes.

ES nodes require a replication solution, such as MariaDB Replication to synchronize several types of database objects, such as:

  • Databases

  • Tables that use other storage engines

  • Views

  • User accounts and privileges

  • Stored procedures and functions

  • Events

ES nodes can use MariaDB Replication to synchronize database schemas. Without replication, most objects need to be created separately on each ES node.

Any ES node serving as a primary must set the xpand_master_skip_dml_binlog and xpand_replicate_alter_as_create_select system variables to the values shown below:

[mariadb]
...
xpand_master_skip_dml_binlog=ON
xpand_replicate_alter_as_create_select=ON

Any ES node serving as a replica must set the slave_ddl_exec_mode and xpand_slave_ignore_ddl system variables to the values shown below:

[mariadb]
...
slave_ddl_exec_mode=STRICT
xpand_slave_ignore_ddl=ON

In-Bound Replication

When using both Xpand topologies, MariaDB Xpand supports in-bound MariaDB Replication.

Some examples of use cases are:

  • Replicating from an Xpand deployment to a separate Xpand deployment for disaster recovery (DR).

  • Replicating from a MariaDB Enterprise Server deployment to an Xpand deployment for migration.

When using the Xpand Performance topology, the Xpand nodes can be configured for in-bound replication:

  • If the primary server is an ES node, the binlog_format system variable on the primary server must be set to ROW.

When using the Xpand Storage Engine topology, the ES nodes and Xpand nodes can be configured for in-bound replication:

  • If the primary server is an Xpand node, the in-bound replication must be configured through one of the Xpand nodes.

  • If the primary server is an ES node, the in-bound replication should be configured through one of the ES nodes. However, if the primary server is an ES node and the in-bound replication is configured through one of the Xpand nodes, the binlog_format system variable on the primary server must be set to ROW.