ApsaraDB RDS for PostgreSQL lets you upgrade the minor engine version. An upgrade provides performance improvements, new features, and security fixes. This ensures the continuous optimization and security of your database service.
For more information about the features of the ApsaraDB RDS for PostgreSQL minor engine versions, see AliPG minor engine version release notes (PostgreSQL 14–17).
Usage notes
Upgrading the minor engine version restarts the instance, which may cause a transient connection that lasts about 30 seconds. We recommend that you perform the upgrade during off-peak hours or ensure that your application has an automatic reconnection mechanism.
You cannot downgrade the minor engine version after an upgrade.
Minor version upgrades do not typically cause compatibility issues. However, extension upgrades might. If an extension, such as the GanosBase extension, is involved in the upgrade, we recommend that you first create a new instance using the restore data of an ApsaraDB RDS for PostgreSQL instance feature. Then, you can test the compatibility of the new extension version on the new instance.
Note the following points about extension upgrades:
If your service uses the PostGIS or GanosBase extension, you must also manually upgrade the PostGIS or GanosBase extension after you upgrade the minor engine version. For more information, see Upgrade spatiotemporal engine extensions.
If your instance runs PostgreSQL 14 with a minor engine version earlier than 20230330 and uses the TimescaleDB extension (version 2.5.0 or earlier), you must manually run the
ALTER EXTENSION timescaledb UPDATE;
command to upgrade the extension after you upgrade the minor engine version to 20230330 or later. This step is required to continue using the TimescaleDB extension.
View the minor engine version
You can view the current minor engine version of an instance in two ways.
Log on to the ApsaraDB RDS console. You can view the version on the Basic Information page of the target instance.
NoteThis method applies only to ApsaraDB RDS for PostgreSQL instances that use cloud disks.
Connect to the target PostgreSQL instance and run the
show rds_release_date;
command.NoteThis method applies to ApsaraDB RDS for PostgreSQL instances that use cloud disks and local disks.
Manually upgrade the minor engine version
Upgrade the minor engine version of an instance that uses local disks
Instances that use local disks do not support manual upgrades of the minor engine version. You can restart the instance to automatically upgrade it to the latest minor version. For more information, see Restart an instance.
If the current instance is a primary instance with read-only instances, you must first restart all read-only instances one by one and then restart the primary instance. If you restart only the primary instance, the minor engine versions of the read-only instances will not be upgraded.
Upgrade the minor engine version of an instance that uses cloud disks
If the current instance is a primary instance with read-only instances, you can upgrade them in two ways.
You can start the minor engine version upgrade on the primary instance. All attached read-only instances are upgraded concurrently, and then the primary instance is upgraded.
If you do not want to upgrade all read-only instances at once, you can upgrade them one by one and then upgrade the primary instance.
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the Configuration Information section, click Update Minor Engine Version.
In the dialog box that appears, select a version for Latest Version and specify the Update Time. Then, click OK.
The fields in the Latest Version parameter are described as follows:
rds
: The RDS instance.postgres
: The PostgreSQL database.1200
: The PostgreSQL major version is 12.20220830
: The AliPG minor engine version. For more information about each minor version, see AliPG minor engine version release notes (PostgreSQL 14–17).12.11
: The PostgreSQL community minor version number.
Automatically upgrade the minor engine version
Automatic upgrades are a supplementary method and do not guarantee that all instances are immediately upgraded to the latest engine version. You can view the engine version status on the Basic Information page of your instance and promptly upgrade the engine version to mitigate potential risks from older versions. If you cancel a system-initiated upgrade task or fail to upgrade to the latest stable version after you receive a console notification, you are responsible for any business interruptions or data loss that may occur. For more information, see Terms of Service.
When you purchase an ApsaraDB RDS for PostgreSQL instance that uses cloud disks, the Minor Engine Version Update Policy is set to Automatic Upgrade by default. If your minor engine version is older than the latest one, the system periodically initiates O&M tasks to perform the upgrade. You will be notified of these tasks by email, or internal message. The automatic upgrade is performed within your specified maintenance window. You can change the upgrade time in Event Management or cancel the task before it starts. For more information, see Scheduled events.
The automatic minor engine version upgrade feature is supported only for instances that use cloud disks.
Modify automatic upgrade settings
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
On the Basic Information page of the instance, find the Configuration Information section and find the Automated Update of Minor Engine Version parameter.
Click Settings to the right of Automated Update of Minor Engine Version.
In the dialog box that appears, select Automatic Upgrade or Manual Upgrade, and then click Confirm.
FAQ
Related documents
If your service uses the PostGIS or GanosBase extension, you must also manually upgrade the PostGIS or GanosBase extension after you upgrade the minor engine version. For more information, see Upgrade spatiotemporal engine extensions.
For more information about each minor version, see AliPG minor engine version release notes (PostgreSQL 14–17).
You can also use API operations to upgrade the minor engine version:
API
Description
Upgrades the minor engine version of an instance.
Sets the minor engine version upgrade policy to automatic or manual.