Search code examples
postgresqlamazon-rdsamazon-aurora

Can not upgrade Aurora RDS Postgres version from 12 to 13


I am trying to upgrade Aurora RDS Postgres cluster db.r5.xlarge from version 12.7 to 13.3. I choose Engine version 13.3, default DB cluster parameter group and DB parameter group default.aurora-postgresql13 and choose 'Apply immediately'.

Received error message:

We're sorry, your request to modify DB cluster clone-cluster has failed. Cannot modify engine version because instance clone-cluster is running on an old configuration. Apply any pending maintenance actions on the instance before proceeding with the upgrade

There are no any pending maintenance actions showing in AWS RDS console and I have no idea what configuration they mean.

We are on a free basic support plan no so we cannot get help from AWS. Can anyone please suggest if there's a way to upgrade the whole cluster at once?


Solution

  • This is not correctly documented at the moment, but it is possible to check and resolve (for those of us automating the upgrade process.) The CLI aws rds describe-pending-maintenance-actions sometimes reports the status. If you know ARNs, you can filter on them, or if just a name, this seems to work:

    aws rds describe-pending-maintenance-actions --query 'PendingMaintenanceActions[?contains(ResourceIdentifier, `test`)`
    

    The maintenance can be applied programmatically using apply-pending-maintenance-action.

    However...

    This message also appears to occur when something about the upgrade path is invalid. In my case, I believe the case is as follows:

    • Source is 9.6.19 Aurora PostgreSQL
    • Target is 10.18. This fails.
    • Set target to 10.14 and upgrade occurs

    In short, the UI, and other information about what versions of what are compatible is incomplete. I have reported this to AWS and they mostly shrugged, telling me to look at the doc. Pffft.