§ Migrating from Percona to GreatSQL
This article introduces how to migrate/upgrade from Percona to the GreatSQL database.
§ Why Migrate/Upgrade
GreatSQL is an open-source branch forked from Percona. Compared with Percona, GreatSQL has many excellent new features and improvements, including but not limited to the following:
| 1. Main Features | GreatSQL 8.4.4-5 | Percona 8.4.4-4 |
|---|---|---|
| LoongArch support | ✔️ | ❌ |
| RISC-V support | ✔️ | ❌ |
| Restoring some source-replica replication compatibility interfaces | ✔️ | ❌ |
| 2. Performance Enhancement Extensions | GreatSQL 8.4.4-5 | Percona 8.4.4-4 |
| Rapid Engine | ✔️ | HeatWave only in cloud |
| Turbo Engine | ✔️ | ❌ |
| Turbo Engine vector similarity search | ✔️ | ❌ |
| Large transaction binlog independent flush optimization | ✔️ | ❌ |
| Parallel replication replay optimization | ✔️ | ❌ |
| Execution plan drift detection | ✔️ | ❌ |
| NUMA affinity optimization | ✔️ | ❌ |
| Non-blocking DDL | ✔️ | ❌ |
| Import optimization for tables without a primary key | ✔️ | ❌ |
| InnoDB parallel query | ✔️ | primary key scan only |
| Parallel LOAD DATA | ✔️ | ❌ |
| InnoDB transaction ReadView lock-free optimization | ✔️ | ❌ |
| InnoDB transaction large lock split optimization | ✔️ | ❌ |
| 3. Developer-Oriented Improvements | GreatSQL 8.4.4-5 | Percona 8.4.4-4 |
| Oracle compatibility - data types | ✔️ | ❌ |
| Oracle compatibility - functions | ✔️ | ❌ |
| Oracle compatibility - SQL syntax | ✔️ | ❌ |
| Oracle compatibility - stored routines | ✔️ | ❌ |
| 4. Basic Feature Improvements | GreatSQL 8.4.4-5 | Percona 8.4.4-4 |
| MGR enhancement - zone tags | ✔️ | ❌ |
| MGR enhancement - arbitrator | ✔️ | ❌ |
| MGR enhancement - read/write node bound VIP | ✔️ | ❌ |
| MGR enhancement - fast single-primary mode | ✔️ | ❌ |
| MGR enhancement - smart primary election | ✔️ | ❌ |
| MGR enhancement - new flow control algorithm | ✔️ | ❌ |
| MGR enhancement - network partition exception handling | ✔️ | ❌ |
| MGR enhancement - node abnormal exit handling | ✔️ | ❌ |
| MGR enhancement - node disk full handling | ✔️ | ❌ |
| MGR enhancement - automatic donor node selection | ✔️ | ❌ |
| MGR enhancement - large transaction compression optimization | ✔️ | ❌ |
| MGR enhancement - viewing replication lag in seconds | ✔️ | ❌ |
| Clone incremental backup | ✔️ | ❌ |
| Clone backup compression | ✔️ | ❌ |
| Binlog read speed limit | ✔️ | ❌ |
| 5. Security Enhancements | GreatSQL 8.4.4-5 | Percona 8.4.4-4 |
| GMSSL support | ✔️ | ❌ |
| Backup encryption | ✔️ | ❌ |
| Policy-based data masking | ✔️ | ❌ |
§ Preparation Before Migration/Upgrade
First download the GreatSQL 8.4 installation package. It is recommended to choose the latest GreatSQL 8.4.4-5 release (opens new window). Whether to choose RPM or binary tarball depends on the specific situation and personal preference.
This article uses the binary tarball installation method.
Before the formal migration/upgrade, be sure to back up your data. You can use any of the following methods:
- Stop for maintenance, copy the current database directory, and make a full physical backup. This method is the fastest to restore.
- Use backup tools such as
mysqldump/xtrabackupto perform a full backup. - Use source-replica replication or MGR to perform a backup on one of the members, or temporarily take a member offline/exit as a standby member.
Next, determine which of the following situations this migration/upgrade belongs to:
- Migrate+upgrade from Percona 8.0 directly to GreatSQL 8.4.4-5 in one go.
- Migrate/upgrade from Percona 8.4.4-4 and earlier versions to GreatSQL 8.4.4-5.
- Migrate+upgrade from MySQL 5.7 and lower versions to GreatSQL 8.4.4-5.
For the first two situations, refer to the method in the document: Upgrading from GreatSQL 8.0 to 8.4 to migrate/upgrade. The process is exactly the same.
For the third situation, you should first upgrade the major versions one by one, e.g., 5.6 => 5.7, 5.7 => the latest 8.0, and then upgrade to GreatSQL 8.4.4-5. You can also use mysqldump to fully back up the data in the lower-version database and then import it into the GreatSQL 8.4.4-5 database environment to complete the upgrade in one go.
§ Downgrading to GreatSQL 8.4.4-5
If you want to downgrade from Percona 8.4.4-4 and later versions to GreatSQL 8.4.4-5, refer to the following steps.
1. Uninstall the telemetry component and shut down the Percona service safely
greatsql> UNINSTALL COMPONENT 'file://component_percona_telemetry';
greatsql> SET GLOBAL innodb_fast_shutdown=1;
greatsql> SHUTDOWN;
2
3
2. Modify the my.cnf configuration file
Modify the basedir parameter to point to GreatSQL 8.4.4-5, and add the upgrade=FORCE parameter.
3. Start the GreatSQL database service to complete the in-place downgrade.
After the upgrade/downgrade is complete, remember to comment out the upgrade=FORCE option in the my.cnf file, or change it to upgrade=AUTO.
Reference Documents
- Upgrade from 8.0 to 8.4 overview (opens new window)
- Changes in MySQL 8.4 (opens new window)
- Upgrade Before You Begin (opens new window)
- What the MySQL Upgrade Process Upgrades (opens new window)
- Smooth upgrade of MySQL 5.7 MGR to GreatSQL 5.7 (opens new window)
Scan the QR code to follow our WeChat official account
