Skip to content

Upgrading Aurora PostgreSQL with Read Replicas from 12 to 16

0

Hi,

We are planning on upgrading from PostgreSQL 12 to 16 to avoid the cost of Extended Support.

Currently reading on the following

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.PostgreSQL.html

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.PostgreSQL.MajorVersion.html

The document link, https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.PostgreSQL.html, does not mention anything about upgrading read replicas?

From https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.PostgreSQL.MajorVersion.html, it says

To safely upgrade the DB instances that make up your cluster, Aurora PostgreSQL uses the pg_upgrade utility. After the writer upgrade completes, each reader instance experiences a brief outage while it's upgraded to the new major version. To learn more about this PostgreSQL utility, see pg_upgrade in the PostgreSQL documentation. You can upgrade your Aurora PostgreSQL DB cluster to a new version by using the AWS Management Console, the AWS CLI, or the RDS API.

Does it mean the Reader gets upgraded automatically too in the process without any other additional steps? I thought there is some failover that has to be carried out to trigger a switch on the Reader/Writer or something like that to complete the upgrade process. Just want to clarify this before we start.

asked a year ago626 views

1 Answer
0

Yes, when upgrading an Aurora PostgreSQL DB cluster to a new major version, the read replicas (reader instances) are automatically upgraded as part of the process without requiring additional steps from you.

The upgrade process for an Aurora PostgreSQL cluster works as follows:

  1. The writer instance (primary) is upgraded first using the pg_upgrade utility.
  2. Once the writer upgrade is complete, each reader instance (read replica) is then automatically upgraded to the new major version.
  3. During the upgrade of each reader instance, there will be a brief outage for that specific reader.

This automatic upgrade of read replicas ensures that all instances in the Aurora PostgreSQL cluster are running the same version after the upgrade process is complete. The brief outage for each reader is necessary to apply the version changes, but it's designed to minimize overall disruption to your cluster's operations.

It's important to note that while the process is automated, you should still plan for potential impacts on your application, especially during the brief outages of the reader instances. Also, remember to test the upgrade process in a non-production environment before applying it to your production cluster to ensure compatibility and optimal performance with the new version.
Sources
PostgreSQL 11 upgrade strategies for Amazon Aurora PostgreSQL and Amazon RDS for PostgreSQL | AWS Database Blog
How to perform a major version upgrade for RDS for PostgreSQL - Amazon Relational Database Service

answered a year ago

EXPERT

reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.