Upgrade DB instance due to current instance does not support the target Postgres version

0

We are currently running Postgres 11.20 on db.t2.medium which only supports Lower than PostgreSQL 13 To upgrade to PostgresSQL 13.9, we have to upgrade the DB instance

From the AWS console, we could modify the DB instance type to , for instance db.t3.medium which supports - All PostgreSQL 15, 14, 13, 12, 11, and 10 versions; and 9.6.22 and higher 9 versions. Through AWS console, after selecting the new DB instance type, will all data moved to the new instance and current DB's connection URL and security group remains unchanged? Or, do we need to export the data and restore it back to the new DB instance?

Actually, all our resources are controlled by terraform script. If, through terraform, upgrade the DB from db.t2.medium to db.t3.medium instance, will data be migrated from the t2 instance to t3 instance during terraform apply? Also, is DB instance upgrade a "green light upgrade"? That is, we could continue saving and retrieving data during the upgrade period?

In production, we have much large data (export data size is 700GB), is there any way to estimate the upgrading time from , for instance db.r4.16xlarge (which supports Postgres lower than 13) to db.r5.4xlarge?

1 Answer
0

Hello.

From the AWS console, we could modify the DB instance type to , for instance db.t3.medium which supports - All PostgreSQL 15, 14, 13, 12, 11, and 10 versions; and 9.6.22 and higher 9 versions. Through AWS console, after selecting the new DB instance type, will all data moved to the new instance and current DB's connection URL and security group remains unchanged? Or, do we need to export the data and restore it back to the new DB instance?

If the change is made from the management console, the endpoint will not be changed.
Also, data will not be deleted.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html

Actually, all our resources are controlled by terraform script. If, through terraform, upgrade the DB from db.t2.medium to db.t3.medium instance, will data be migrated from the t2 instance to t3 instance during terraform apply? Also, is DB instance upgrade a "green light upgrade"? That is, we could continue saving and retrieving data during the upgrade period?

Changing the instance type in Terraform does not change the endpoint.
Also, your data will not be lost.
If you are concerned, we recommend creating a snapshot of your RDS instance before proceeding.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateSnapshot.html

Also, when updating the instance type in Terraform, it will not be applied immediately unless "apply_immediately" is set to true.
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance

In production, we have much large data (export data size is 700GB), is there any way to estimate the upgrading time from , for instance db.r4.16xlarge (which supports Postgres lower than 13) to db.r5.4xlarge?

I think it is difficult to estimate as it will vary depending on the environment and data size.
My experience is that the instance type is changed in about 10 minutes.
If you have a multi-AZ setting, the change will start from standby instance, so downtime can be reduced to about 1 minute.
https://repost.aws/knowledge-center/rds-mysql-downtime-impact

profile picture
EXPERT
answered 4 months ago
profile pictureAWS
EXPERT
reviewed 4 months 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.

Guidelines for Answering Questions