You can upgrade the RDS for PostgreSQL major version to enjoy more functions and higher performance and security. Major version upgrades may introduce changes that are backward incompatible with existing versions and affect service running. Therefore, you need to test services on the target version before starting the upgrade.
In this section, the source instance indicates the DB instance that runs the source version, and the target instance indicates the DB instance that runs the target version.
To connect to a DB instance through an ECS, you need to create an ECS first.
The region, AZ, VPC, subnet, and security group of the ECS are the same as those of the RDS for PostgreSQL DB instance to be upgraded.
For details, see 5.
The version of the PostgreSQL client must be the same as that of the RDS for PostgreSQL instance. A PostgreSQL database or client will provide pg_dump, pg_restore, and psql tools.
select extname from pg_extension;
For details about the extensions supported by different RDS for PostgreSQL versions, see Supported Extensions.
Perform the following operations on the prepared ECS.
postgres=# \l
postgres=# \l
postgres=# create database my_target_db;
pg_dump -Fc -v --host=source_IP --port=source_port --username=my_user --dbname=my_source_db | pg_restore -v --no-owner --host=target_IP --port=target_port --username=my_user --dbname=my_target_db
pg_dump -Fc -v --host=source_IP --port=source_port -Ndbms_lob -Ndbms_output -Ndbms_random -Nsys -Nutl_raw -Npg_catalog --username=my_user --dbname=my_source_db | pg_restore -v --no-owner --host=target_IP --port=target_port --username=my_user --dbname=my_target_db