Postgresql major upgrade engine version

Background

Currently in midas and mfc, we have some Posgresql RDS engine version that still uses version 9.5.x, which is this version will be End Of Life on February 11, 2021 [1]. We need to upgrade our engine version to the newer version, moreover when it's upgraded, we have possibility to change instance type to newer generation [2], if neccessary.

perform dry run (testing first)

apply to staging and production

some steps from this part will only repeat what we've did on dry run part.

[1] https://www.postgresql.org/support/versioning/
[2] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.Support
[3] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.PostgreSQL.html#USER_UpgradeDBInstance.PostgreSQL.MajorVersion
[4] https://dba.stackexchange.com/questions/228981/cpu-usage-constantly-high-after-upgrading-from-postgres-9-5-to-9-6-to-10-6