Amazon Relational Database Service (Amazon RDS) for MariaDB 10.2 major version is reaching end of life (EOL) on October 15, 2022. The end-of-life process ends standard support for this version. We recommend that you upgrade all MariaDB 10.2 DB instances to MariaDB 10.3 or higher as soon as possible. Amazon Relational Database Service (Amazon RDS) provides newer versions of databases, soon after community release, so you can keep your DB instances up to date. Newer DB versions include bug fixes, security enhancements, and other optimizations.
When Amazon RDS for MariaDB supports a new version, you can choose how and when to upgrade your DB instances. Amazon RDS for MariaDB supports both major version and minor version upgrades. A major engine version upgrade can introduce changes that aren’t backward-compatible with existing applications, whereas minor version upgrades include only changes that are backward-compatible with existing applications. For the community release dates and EOL dates of all versions of MariaDB, see the MariaDB Server maintenance policy.
Amazon RDS for MariaDB provides an option to automate some of these patching decisions, such as automatic minor version upgrades. However, major version upgrades must be requested explicitly. Therefore, it’s critical to be aware of common issues, steps involved, and use best practices to upgrade your major version with the least impact on your applications.
In this post, we look at the following topics:
- Amazon RDS for MariaDB 10.2 end-of-life timeline
- Available upgrade choices
- Best practices to follow during the upgrade process
Amazon RDS for MariaDB 10.2 major version end-of-life timeline
The EOL timeline is as follows:
- Now through October 15, 2022, 00:00:01 AM UTC – You can initiate upgrades of Amazon RDS for MariaDB 10.2 instances to MariaDB 10.3 or 10.6 at any time.
- July 15, 2022, 00:00:01 AM UTC – After this date and time, you can’t create new RDS instances with MariaDB major version 10.2 from either the AWS Management Console or the AWS Command Line Interface (AWS CLI). You can continue to restore your MariaDB 10.2 snapshots as well as create read replicas with version 10.2 until the October 15, 2022, end of support date.
- October 15, 2022, 00:00:01 AM UTC – Amazon RDS will automatically upgrade MariaDB 10.2 instances to version 10.3 within the earliest scheduled maintenance window that follows. After this date and time, any restoration of RDS for MariaDB 10.2 database snapshots will result in an automatic upgrade of the restored database to a still supported version at the time.
- January 15, 2023, 00:00:01 AM UTC – Amazon RDS will automatically upgrade any remaining MariaDB 10.2 instances to version 10.3 whether or not they are in a maintenance window.
For more information about the EOL dates for Amazon RDS for MariaDB 10.2, see Announcement: Amazon Relational Database Service (Amazon RDS) for MariaDB 10.2 End-of-Life date is October 15, 2022.
Version upgrade choices in Amazon RDS for MariaDB 10.2
Major version upgrades in Amazon RDS for MariaDB could go only from one major version to the next immediate major version until the release of RDS for MariaDB 10.6. To perform a major version upgrade to a MariaDB version lower than 10.6, upgrade to each major version in order. For example, to upgrade from version 10.2 to version 10.5, upgrade in the following order: 10.2 to 10.3, 10.3 to 10.4, and then 10.4 to 10.5.
Amazon RDS for MariaDB 10.6, released in February 2022, supports multi-major version upgrade. That is, you can upgrade any prior MariaDB major release (10.2, 10.3, 10.4, 10.5) to Amazon RDS for MariaDB 10.6 in a single step. Moreover, you can take a snapshot of an existing MySQL 5.6 or 5.7 instance and use the RDS snapshot restore feature to convert it into a MariaDB 10.6 instance.
To summarize, Amazon RDS supports the following in-place upgrades for major versions of the MariaDB database engine:
- Any supported MariaDB version to MariaDB 10.6
- MariaDB 10.4 to MariaDB 10.5
- MariaDB 10.3 to MariaDB 10.4
- MariaDB 10.2 to MariaDB 10.3
You can also get a list of all valid upgrade target versions for a database version using the describe-db-engine-versions AWS CLI command in a given Region:
aws rds describe-db-engine-versions --output=table --engine mariadb --engine-version 10.2
As part of deciding which version to upgrade to, you have the following options:
- MariaDB 10.3 – Community EOL planned for May 2023
- MariaDB 10.4 – Community EOL planned for June 2024
- MariaDB 10.5 – Community EOL planned for June 2025
- MariaDB 10.6 – Community EOL planned for July 2026
Amazon RDS for MariaDB 10.3, 10.4, 10.5 and, 10.6 will be available under standard support at least until the community EOL date. If you have any MariaDB 10.2 instances in your account, you can upgrade them before October 15, 2022. For instructions on upgrading a database instance, see Upgrading the MariaDB DB engine.
Choosing a target engine version for upgrade
We recommend you upgrade any of your RDS for MariaDB 10.2 DB instances to 10.3 (or greater) versions because they are supported at least until the community EOL date. We intend to support major version releases (for example, MariaDB 10.3, MariaDB 10.6) for at least 3 years after they are initially supported by Amazon RDS.
When upgrading any database engine’s major versions, checking your application’s compatibility with the new version and its features plays a crucial role in the upgrade’s overall success. MariaDB database versions and releases can differ in how they work and interact with applications, which could result in compatibility issues. Therefore, it’s crucial to upgrade your RDS for MariaDB DB instances to a version that is compatible, certified, and supported by your application.
In certain cases, feature improvements and performance optimizations in newer releases also play a pivotal role in picking a target engine version for your upgrade.
For example, MariaDB 10.3 offers improved Oracle compatibility, support for querying historical states of the database, features that increase flexibility for developers and DBAs, and improved manageability.
MariaDB 10.4 introduced several new features, which include an instant drop column operation, additional authentication capabilities, and a capability to reload new SSL certificates without restarting the server.
MariaDB 10.5 introduced several new features, such as native support for the JSON data type and built-in JSON functions, and query performance improvements via optimizer improvement, resulting in better parsing and explain plans. It also introduced dynamic buffer pool resizing and improved tablespace discovery for minimizing crash recovery duration.
Similarly, MariaDB 10.6 introduces multiple MariaDB features to enhance the performance, scalability, reliability, and manageability of your workloads such as MyRocks storage engine, AWS Identity and Access Management (IAM) integration, flexible upgrades, delayed replication, Oracle PL/SQL compatibility, atomic DDL, and other enhancements like the JSON_TABLE function for transforming JSON data to relational format within SQL, faster empty table data load with Innodb, new sys_schema
for analysis and troubleshooting, optimizer enhancements for ignoring unused indexes, and performance improvements.
Amazon RDS for MariaDB versions 10.4 and higher supports the latest instance classes using AWS Graviton2 processors, such as r6g and m6g, which offer up to 35% better performance and up to 52% price-performance improvement for RDS open-source databases, based on internal testing of workloads with varying characteristics of compute and memory requirements.
Amazon RDS for MariaDB versions 10.4 and higher is also offered on the latest M6i and R6i instances, powered by third-generation Intel Xeon Scalable processors with an all-core turbo frequency of 3.5 GHz, delivering up to 20% better transaction throughput over equivalent M5 and R5 instances.
Downtime considerations for a major version upgrade
Amazon RDS for MariaDB lets you manually initiate a major version upgrade by modifying the DB instance—either via the AWS Management Console, AWS CLI, or Amazon RDS API. This is an in-place upgrade and requires downtime for your applications during the upgrade process. The duration of the upgrade process depends on the engine version and the DB instance class. You can determine the amount of time it takes to upgrade by performing trial upgrade exercises with a snapshot restore in a staging environment. Upgrading your production database instance is an irreversible process. If any issue occurs during or after the upgrade process, the only fallback option is to restore from the latest snapshot. As a best practice, always take a snapshot before initiating the upgrade.
If you’re running your DB instance in a Multi-AZ deployment, Amazon RDS for MariaDB upgrades both the primary and Multi-AZ synchronous standby simultaneously.
If your RDS for MariaDB DB instance is in use with a production application, you can reduce the amount of downtime for your application by using a read replica to perform most of your maintenance tasks ahead of time. This method involves setting up a logical read replica that has the same major and minor version as the primary instance, then upgrading the read replica to a newer version and ensuring that all validation steps for the application pass through. When this is done, make sure the replication has caught up completely by stopping further application writes to ensure data integrity. Then promote the read replica to a standalone instance and point your application to the upgraded, promoted instance that has the up-to-date data.
How Amazon RDS for MariaDB performs a major version upgrade
When a major version upgrade is invoked on the console or via the AWS CLI or Amazon RDS API, Amazon RDS automation completes the following steps:
- Verifies if any read replicas need to be upgraded.
- Takes a pre-upgrade snapshot (if backups are enabled on the RDS for MariaDB DB instance). This snapshot can be used for rollback purposes if the upgrade encounters any issues.
- Shuts down the instance and prepares the instance for upgrade.
- Runs the mysql_upgrade script to upgrade tables to the newer version.
- Takes a post-upgrade snapshot.
Key considerations and best practices
When performing an upgrade, consider the following:
- If your RDS for MariaDB DB instance is using read replicas, you must upgrade all the read replicas before upgrading the source instance.
- Take a manual snapshot using the
create-db-snapshot
AWS CLI command or via the console prior to starting the upgrade phase. - If your RDS for MariaDB 10.2 instances are running on one of the deprecated t1, m1, or m2 instance types, you have to change to a newer instance type prior to initiating the major version upgrade. You can identify any RDS for MariaDB DB instances running the older instance types via the console or the
describe-db-instances
AWS CLI command. - Amazon RDS truncates the
slow_log
andgeneral_log
tables during a major version upgrade. To preserve log information, back up the log contents before the major version upgrade. Take a table-level backup of theslow_log
andgeneral_log
tables using the following code:mysqldump -h <RDS-instance-endpoint> -u <username> -p --databases mysql --tables slow_log --skip-lock-tables > filename.sql
- By default, when upgrading from one major version to next higher major version, Amazon RDS for MariaDB chooses the default option group if the corresponding custom option group for the target version isn’t chosen. Always choose to have a custom option group created in the target version that reflects the options that you have from the version you’re upgrading from.
- Amazon RDS creates a new parameter group for the target upgrade version automatically during a major version upgrade if one isn’t provided. For RDS for MariaDB DB instances using custom parameter groups, when upgrading, always choose a parameter group in the target version that matches your current version parameter group with similar parameters carrying similar or same values. If the parameters don’t exist or have their default values changed between versions, carefully test and validate the results and behavior prior to upgrading the instance.
- Disable any jobs prior to upgrading and ensure you enable them post-upgrade. Also test job behavior in a lower environment prior to performing the actual database upgrade process.
- Perform an overall benchmark for the application to understand if there are any dependencies and application behavior deviation in a lower environment prior to performing the major version upgrade in the production environment.
- Keep a list of clients and their drivers used along with the appropriate version numbers. Identify that these clients and their drivers work with newer versions of MariaDB.
- Post-upgrade, we strongly recommend you test your automated backup restore process, disaster recovery, or production to non-production refresh procedures.
Conclusion
In this post, we reviewed the MariaDB 10.2 EOL support timeline in Amazon RDS, assessed version upgrade choices, and advised on how to pick a target version for upgrade. Finally, we covered the best practices and what to expect during the upgrade process. With Amazon RDS for MariaDB 10.2 reaching end of standard support on October 15, 2022, we encourage you to upgrade your RDS for MariaDB 10.2 instances to Amazon RDS for MariaDB 10.3 (or greater) at the earliest to test out the version upgrades, validate your applications, and take advantage of features and optimizations available on newer versions.