- source and target version
- Use the multi-AZ or not
- Contain the Read replica or not
- Total data volume
You can upgrade a PostgreSQL database to its next major version. From some PostgreSQL database versions, you can skip to a higher major version when upgrading. If your upgrade skips a major version, the read replicas are also upgraded to that target major version.
The following table lists the source PostgreSQL database versions and the associated target major versions available for upgrading
-
Follow up the preparation guide and check list
-
You can't upgrade read replicas separately. An upgrade also upgrades the in-Region read replicas along with the primary instance. To prevent a replica upgrade, promote the replica to a standalone instance or delete it before starting the upgrade process.
- Create the target version PostgreSQL database and use AWS DMS, logical replication, or the pglogical extension to set up replication between two different major versions from source to target. When both instances are in sync, cut over and point applications to the new master RDS instance.
Below are sample Achieving minimum downtime for major version upgrades in Amazon Aurora for PostgreSQL using AWS DMS
-
Promote the replica, making it a standalone instance, upgrade to newer major version. And cut-off the DNS once the upgrade complete. Then you can upgrade the primary instance to the newer major version.
-
Use the default upgrade option, this will upgrading primary and replicas concurrently Multi-AZ configuration doesn’t help avoid an outage during a database engine upgrade. Multi-AZ reduces outage time during an instance scale compute, but because storage level changes are required during a database engine upgrade, both instances upgrade at the same time.
Comparison the outage: #1 < #2 < #3
Upgrading the PostgreSQL DB engine for Amazon RDS
Best practices for upgrading Amazon RDS to major and minor versions of PostgreSQL
Best practices for Amazon RDS for PostgreSQL major upgrades and replicas