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개 답변
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
전문가
답변함 4달 전
profile pictureAWS
전문가
검토됨 4달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠