hit3k
hit3k

Reputation: 1493

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?

Upvotes: 12

Views: 14251

Answers (5)

Cozzaro Nero
Cozzaro Nero

Reputation: 487

This one worked for me. In rds, select the server highlighted in the error message, go to "Configuration" and make sure that the "Recommendations" area is empty, otherwise, "Apply Now" the recommendation/s. Once all completed, "Modify" from the Global/Regional Cluster and try to upgrade again. enter image description here

Upvotes: 1

Stoinov
Stoinov

Reputation: 792

Hit the same issue with upgrade to a major version and here's the undocumented solution I found:

  • Select an instance from the cluster, and in the actions menu you should see Upgrade Now.
  • Do this for each instance that is part of the cluster.
  • Modify the cluster and you should be able to upgrade to any available 13.x version.

Even though it is shown as the same version as the Cluster, the Upgrade now action will run configuration update on the instance itself putting it in maintenance and rebooting it.

Upvotes: 2

Tom Harrison
Tom Harrison

Reputation: 14018

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.

Upvotes: 1

Apakottur
Apakottur

Reputation: 36

Just to add to the other great answers, another possible reason for "old configuration" errors is attempting to upgrade from an old minor version.

I was trying to upgrade from Postgres 12.6 directly to 13.3, which is not supported. Instead, I had to upgrade to 12.7 first and then upgrade to 13.3.

It's written in the docs, but I didn't notice the minor version requirement.

Upvotes: 1

mbp
mbp

Reputation: 1273

I had this issue and contacted AWS support. They said it is a known issue for (some, or all) db.t3 instance types. In my case I was using db.t3.medium.

So the workaround is as follows:

  • Change instance type on the cluster to r5.xlarge or db.r6g.large.
  • Upgrade to PostgreSQL 13.3
  • Change instance type back to db.t3.medium.

Upvotes: 22

Related Questions