We have an AWS RDS PostgreSQL 11 cluster (currently version 11.13), in which we have a few databases and some 1500 tables. The RDS cluster is of size "db.r5.xlarge", with 4 vCPUs, 32 GB RAM and general purpose SSD (gp2) storage. Currently the cluster has about 15 TB of data.
We now need to upgrade to the latest database server version, and are planning to take this opportunity to switch from a pure PostgreSQL cluster to an Aurora PostgreSQL instance, in the hope that this will be more efficient.
According to AWS documentation, there are four options that can be used:
- Migrating an RDS for PostgreSQL DB instance using a snapshot
- Migrating an RDS for PostgreSQL DB instance using an Aurora read replica
- Importing S3 data into Aurora PostgreSQL
- Migrating from a database that is not PostgreSQL-compatible
Option 4 does not apply to our case as our existing database server is PostgreSQL. Option 3 is tedious and time-consuming, as tables need to be imported one at a time, with several steps required per table. The only feasible remaining options for us thus are 1 and 2.
As I understand it, the migration process will involve following steps:
- Create new Aurora PostgreSQL instance with version 11.13 (target Aurora PostgreSQL server must have the same major and the same or higher minor version as the source PostgreSQL server).
- Import data using either option 1. or 2. above.
- Upgrade Aurora PostgreSQL instance from version 11.13 to 14.3.
My questions now are:
- Is my understanding of all of the above correct?
- Which of the options for importing data, i.e. either using a snapshot or using an Aurora read replica, is likely to be faster given the size of our database?