升级 Postgres Aurora 主版本

Upgrading Postgres Aurora Major Version

根据:

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Upgrading.html

Manually Upgrading the Engine Version

To perform a major version upgrade of a DB cluster, you can restore a snapshot of the DB cluster and specify a higher major engine version. For information about restoring a DB cluster, see Restoring from a DB Cluster Snapshot.

但是我在任何地方都看不到在还原时选择数据库引擎的选项。 文档不正确吗? 我错过了什么吗?

我在尝试将 Aurora Postgres 从 9.x 升级到 10.x 时也遇到了同样的问题。 GUI 和 aws-cli 不允许您在恢复快照时指定更高的版本号。

AWS 支持人员确认目前不支持此功能,这是我与技术人员的聊天会话:

I should have recollected earlier. Currently there isn't an in-place upgrade path from Aurora 9.x to version 10. This is something that is frequently requested for and the engineering team is working on but we don't have an ETA as to when this will be fixed.

AWS 确实提供了两个选项:

  1. 使用pg_dump和pg_restore提取数据并将其加载到升级目标集群中。

  2. 使用 AWS Data Migration Services 迁移数据。 DMS 具有停机时间最短的优势,但它具有许多您必须评估的限制。例如一些数据类型,如 JSON 和带有时区的时间戳是 'partially migrated'.

使用 PostgreSQL 作为源 and/or DMS 目标的 AWS DMS 文档链接:

Postgres 作为 DMS 来源:https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html#CHAP_Source.PostgreSQL.Homogeneous.DMS

Postgres 作为 DMS 目标: https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.PostgreSQL.html

我喜欢的技术 pg_dump/pg_restore 因为它更原生,但需要更多的停机时间。

Aurora Postgres 现在支持此功能。不再需要将快照恢复到新集群中。程序解释 in the documentation.

截至 2020 年 5 月 22 日: "Currently, you can do a major version upgrade from Aurora PostgreSQL version 9.6.11 or 9.6.12 database clusters to Aurora PostgreSQL version 10.11."