How to upgrade aws rds postgresql

## 0. Read the summary of upgrade pg
https://docs.aws.amazon.com/zh_cn/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.PostgreSQL.html

## 1. Prepare Action
1.1. Choose Preferred Upgrade Targets from :
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.PostgreSQL.html

1.2 Set the env variables.

1.3. Check the current instance infomation,check if non-default option and parameter group

1.4. Check any vailable target major version

Double check with the version which you choose in step 1.1


## 2. Upgrade Action

2.1. List all database in the instance

2.2. Check if any REG data type, these data type should be handle(remove or change),before upgrade


2.3 If upgrade from pg 9.3, check if any exist LINE data type,these data type should be handle(remove or change),before upgrade

2.4. check the extension support

https://docs.aws.amazon.com/zh_cn/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.Extensions

2.5. check if any prepare transaction, if any, please kill the session and wait for no prepared traction.

2.6. If any Read Replica instance from , promote the read replica before upgrade.

2.7. Begin upgrade postgresql


2.8. monitor the instance upgrade status:

## 3. Post Action
3.1. Update the pg extension to new version, new version could be found in step 3.5

3.2. Delete the read replica after you confirm it will not be used.

3.3. Create new read replica for upgrade instance if necessary.

相关文章

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据