You can call the UpgradeDBInstanceMajorVersionPrecheck operation to check the compatibility between a new major engine version and an ApsaraDB RDS for PostgreSQL instance before you perform an upgrade to the new major engine version.
ApsaraDB RDS for PostgreSQL provides the major version upgrade feature. You can use this feature to upgrade the major engine version of an ApsaraDB RDS for PostgreSQL instance.
Before you perform an upgrade, you must perform an upgrade check and make sure that the check result is Success. You can call this operation to perform an upgrade check.
An upgrade brings impacts, such as a transient connection that lasts a few minutes. We recommend that you perform an upgrade during off-peak hours. Before you perform an upgrade, we recommend that you read Upgrade the major engine version of an ApsaraDB RDS for PostgreSQL instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UpgradeDBInstanceMajorVersionPrecheck |
The operation that you want to perform. Set the value to UpgradeDBInstanceMajorVersionPrecheck. |
DBInstanceId | String | Yes | pgm-bp1c808s731l**** |
The ID of the instance. The instance must meet the following requirements:
|
TargetMajorVersion | String | Yes | 12.0 |
The new major engine version of the instance. The new major engine version must be later than the original major engine version. For example, if the original major engine version is PostgreSQL 9.4, the new major engine version can be PostgreSQL 10, PostgreSQL 11, PostgreSQL 12, or PostgreSQL 13. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
DBInstanceName | String | pgm-bp1c808s731l**** |
The name of the instance. |
RequestId | String | 99C1FEEE-FB44-5342-8EBA-DC1E1A1557A4 |
The ID of the request. |
TargetMajorVersion | String | 12.0 |
The new major engine version of the instance. |
TaskId | String | 41698**** |
The ID of the upgrade check task. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=UpgradeDBInstanceMajorVersionPrecheck
&DBInstanceId=pgm-bp1c808s731l****
&TargetMajorVersion=12.0
&<Common request parameters>
Sample success responses
XML
format
<UpgradeDBInstanceMajorVersionPrecheck>
<TaskId>41698****</TaskId>
<RequestId>99C1FEEE-FB44-5342-8EBA-DC1E1A1557A4</RequestId>
<TargetMajorVersion>12.0</TargetMajorVersion>
<DBInstanceName>pgm-bp1c808s731l****</DBInstanceName>
</UpgradeDBInstanceMajorVersionPrecheck>
JSON
format
{
"TaskId": "41698****",
"RequestId": "99C1FEEE-FB44-5342-8EBA-DC1E1A1557A4",
"TargetMajorVersion": 12.0,
"DBInstanceName": "pgm-bp1c808s731l****"
}
Error codes
Http status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidDBInstanceName.NotFound | The specified DB instance name does not exist. | The error message returned because the name of the instance cannot be found. |
For a list of error codes, visit the API Error Center.