For the complete documentation index, see llms.txt. This page is also available as Markdown.

Upgrading from MariaDB 11.4 to MariaDB 11.8 with Galera Cluster

Rolling upgrade procedure for moving a Galera Cluster from MariaDB 11.4 to MariaDB 11.8, covering pre-upgrade checks, repository changes, system-versioned table constraints

Galera Cluster ships with the MariaDB Server. Upgrading a Galera Cluster node is very similar to upgrading a server from MariaDB 11.4 to MariaDB 11.8. For more information on that process as well as incompatibilities between versions, see the Upgrade Guide.

Performing a Rolling Upgrade

The following steps can be used to perform a rolling upgrade from MariaDB 10.11 to MariaDB 11.4 when using Galera Cluster. In a rolling upgrade, each node is upgraded individually, so the cluster is always operational. There is no downtime from the application's perspective[cite: 5, 6, 7, 8].

First, before you get started:

  1. Take a look at Upgrading from MariaDB 11.4 to MariaDB 11.8 to see what has changed between the major versions.

  2. System-Versioned Tables Performance Warning: MariaDB 11.8 extends the maximal allowed value for timestamps up to '2106-02-07 06:28:15 UTC'. If you are using system-versioned tables, all rows and indexes must be updated to use this extended range. Upgrading to 11.8 can take a long time if you have many rows in your system-versioned tables! If you are not using system-versioned tables, the upgrade should execute rapidly.

  3. Check whether any system variables or options have been changed or removed. For example, the alter_algorithm system variable has been deprecated and is ignored since MariaDB 11.5. Make sure that your server's configuration is compatible with the new MariaDB version before upgrading.

  4. Character Set Default Shift: The default character set changes from latin1 to utf8mb4. Ensure your database parameters align or explicitly define your previous collation options in your configuration files if you maintain legacy replication branches.

  5. Check whether replication has changed in the new MariaDB version in any way that could cause issues while the cluster contains upgraded and non-upgraded nodes.

  6. Check whether any new features have been added to the new MariaDB version. If a new feature (such as the new VECTOR data type or parsec authentication plugin) cannot be replicated to the old MariaDB version, then do not use that feature until all cluster nodes have been upgraded.

  7. Next, make sure that the Galera version numbers are compatible. Both MariaDB 11.4 and 11.8 releases ship with modern releases of Galera 4 (wsrep API 26). For the purposes of a rolling upgrade, ensure your versions align across these ecosystem baselines.

  8. See What is MariaDB Galera Cluster?: Galera wsrep provider Versions for information on which MariaDB releases use which Galera wsrep provider versions.

  9. You want to have a large enough gcache to avoid a State Snapshot Transfer (SST) during the rolling upgrade. The gcache size can be configured by setting gcache.size. For example: wsrep_provider_options="gcache.size=2G".

Before you upgrade, it would be best to take a backup of your database. This is always a good idea to do before an upgrade. We would recommend mariadb-backup.

Then, for each node, perform the following steps:

1

Modify the repository configuration, so the system's package manager installs MariaDB 11.8.

2

If you use a load balancing proxy such as MaxScale or HAProxy, make sure to drain the server from the pool so it does not receive any new connections.

4

Uninstall the old version of MariaDB and the Galera wsrep provider.

5

Install the new version of MariaDB and the Galera wsrep provider[cite: 5, 6, 7, 8].

see Installing MariaDB Packages with APT for more information.

6

Make any desired changes to configuration options in option files, such as my.cnf. This includes removing any system variables or options that are no longer supported.

7

On Linux distributions that use systemd you may need to increase the service startup timeout as the default timeout of ninety seconds may not be sufficient(especially if system-versioned tables trigger structural row scans). See Systemd: Configuring the Systemd Service Timeout for more information.

9

Run mysql_upgrade (or mariadb-upgrade) with the --skip-write-binlog option. mysql_upgrade does two things:

  1. Ensures that the system tables in the mysql database are fully compatible with the new version.

  2. Does a very quick check of all tables and marks them as compatible with the new version of MariaDB

When this process is done for one node, move onto the next node[cite: 5, 6, 7, 8].

spinner

Last updated

Was this helpful?