ApsaraDB RDS for PostgreSQL lets you upgrade the minor engine version. These upgrades provide performance improvements, new features, and security fixes to continuously optimize and secure your database service.
For more information about the features of the ApsaraDB RDS for PostgreSQL minor engine versions, see AliPG kernel minor version releases (PostgreSQL 14 to 18).
Usage notes
-
Upgrading the minor engine version restarts the instance, which causes a connection interruption of about 30 seconds. We recommend performing the upgrade during off-peak hours or ensuring that your application has an automatic reconnection mechanism.
-
You cannot downgrade the minor engine version after an upgrade.
-
Minor engine version upgrades typically do not cause compatibility issues. However, extension upgrades might. If the upgrade involves an extension, such as the GanosBase extension, we recommend using the Restore PostgreSQL data feature to create a test instance and verify the new extension's compatibility.
-
Keep the following points in mind for extension upgrades:
-
If your instance uses the PostGIS or GanosBase extension, you must also manually upgrade the PostGIS or GanosBase extension after upgrading 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 you use the TimescaleDB extension (version 2.5.0 or earlier), you must upgrade the extension after upgrading the minor engine version to 20230330 or a later version. To do so, manually run the
ALTER EXTENSION timescaledb UPDATE;command. This step is necessary to continue using the TimescaleDB extension.
-
View the minor engine version
You can view an instance's current minor engine version in one of the following ways:
-
Log on to the ApsaraDB RDS console. The version is available on the Basic Information page of your instance.
NoteThis method applies only to ApsaraDB RDS for PostgreSQL cloud disk instances.
-
Connect to the target PostgreSQL instance and run the
show rds_release_date;command.NoteThis method applies to ApsaraDB RDS for PostgreSQL cloud disk instances and local disk instances.
Manually upgrade the minor engine version
Upgrade local disk instances
You cannot manually upgrade a local disk instance. To upgrade, restart the instance to automatically update it to the latest minor engine version. For more information, see Restart an ApsaraDB RDS for PostgreSQL instance.
For primary instances with attached read-only instances, first restart each read-only instance, and then restart the primary instance. Restarting only the primary instance does not upgrade the minor engine versions of the attached read-only instances.
Upgrade cloud disk instances
For a primary instance with attached read-only instances, you can use one of the following upgrade methods:
-
Start the upgrade on the primary instance. This action first upgrades all attached read-only instances concurrently, and then upgrades the primary instance.
-
To avoid a simultaneous upgrade of all read-only instances, upgrade each one individually before you 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 from the Latest Version drop-down list, specify the Update Time, and then click OK.
The Latest Version string consists of the following parts:
-
rds: The instance is an RDS instance. -
postgres: The database engine is PostgreSQL. -
1200: The PostgreSQL major version is 12. -
20220830: The minor engine version of the AliPG kernel. For more information about each minor engine version, see AliPG kernel minor version releases (PostgreSQL 14 to 18). -
12.11: The PostgreSQL community minor version.
-
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 minor engine version. You can view the status of the minor engine version on the Basic Information page of your instance and proactively upgrade the minor engine version to mitigate potential risks that are associated with outdated versions. If you cancel a system-initiated upgrade task or fail to upgrade to the latest stable version after you receive a notification in the console, you are liable for any resulting business interruptions or data loss. For more information, see the Terms of Service.
When you purchase an ApsaraDB RDS for PostgreSQL instance with cloud disks, the Minor Engine Version Update Policy is set to Automatic Upgrade by default. If your minor engine version is earlier than the latest version, the system periodically schedules proactive O&M tasks to upgrade the minor engine version. You are notified of these tasks by email, and internal messages. The automatic upgrade is performed within the maintenance window that you configure. You can change the upgrade time in Event Management or cancel a task before it starts. For more information, see Scheduled events.
The automatic minor engine version upgrade feature is available only for cloud disk instances.
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, go to the Configuration Information section and view the status of Automated Update of Minor Engine Version.
-
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 click OK.
FAQ
Related documents
-
If your service already uses the PostGIS or GanosBase extension, you must also manually upgrade the PostGIS or GanosBase extension after you upgrade the minor engine version. For instructions, see Spatiotemporal engine extension upgrade.
-
For more information about each minor engine version, see AliPG kernel minor version releases (PostgreSQL 14 to 18).
-
You can also use the following 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.