gpt4 book ai didi

postgresql - 无法将 aurora-postgresql 从 9.6.9 升级到 10.7

转载 作者:行者123 更新时间:2023-11-29 13:40:20 25 4
gpt4 key购买 nike

我在 db.r4.large 的单个实例中运行带有 aurora-postgresql 引擎 9.6.9 的 AWS Aurora PostgreSQL 集群。现在,我想将我的 Aurora Postgresql 升级到引擎 10.7。

https://docs.amazonaws.cn/en_us/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Upgrading.html

AWS 文档建议,在修改数据库集群时应该执行升级操作。但是,下拉列表中没有任何与 10.x 兼容的 PostgreSQL。

Terraform:在将引擎版本从 9.6.9 更改为 10.7 时,只会从集群中删除当前的 9.6.9 数据库实例,但不会创建新的 10.7 数据库实例。

resource "aws_rds_cluster" "test" {
...
engine = "aurora-postgresql"
engine_version = "10.7" # old 9.6.9
...

}
resource "aws_rds_cluster_instance" "test_cluster_instances" {
count = 1
cluster_identifier = "${aws_rds_cluster.test.id}"
instance_class = "db.r4.large"
engine = "aurora-postgresql"
engine_version = "10.7" # old 9.6.9
...
}

地形规划:

  ~ update in-place  
-/+ destroy and then create replacement

Terraform will perform the following actions:

~ aws_rds_cluster.test
engine_version: "9.6.9" => "10.7"

-/+ aws_rds_cluster_instance.test_cluster_instances (new resource required)
id: "test-0" => <computed> (forces new resource)
apply_immediately: "true" => "true"
arn: "arn:aws:rds:us-east-1:xxxxxx:db:test-0" => <computed>
auto_minor_version_upgrade: "false" => "false"
availability_zone: "us-east-1a" => <computed>
cluster_identifier: "test" => "test"
copy_tags_to_snapshot: "true" => "true"
db_parameter_group_name: "default.aurora-postgresql9.6" <computed>
db_subnet_group_name: "test_db" => "test_db"
dbi_resource_id: "db-QDIHAS6J2MLMVKHVUENDTFWQJE" => <computed>
endpoint: "xxxxx.us-east-1.rds.amazonaws.com" => <computed>
engine: "aurora-postgresql" => "aurora-postgresql"
engine_version: "9.6.9" => "10.7" (forces new resource)
identifier: "test-0" => "test-0"
identifier_prefix: "" => <computed>
instance_class: "db.r4.large" => "db.r4.large"
kms_key_id: "" => <computed>
monitoring_interval: "0" => "0"
monitoring_role_arn: "" => <computed>
performance_insights_enabled: "false" => "false"
performance_insights_kms_key_id: "" => <computed>
port: "5432" => <computed>
preferred_backup_window: "03:00-04:00" => <computed>
preferred_maintenance_window: "sun:03:00-sun:04:00" => "sun:03:00-sun:04:00"
promotion_tier: "0" => "0"
publicly_accessible: "true" => "true"
storage_encrypted: "false" => <computed>
tags.%: "1" => "1"
tags.instance: "test-0" => "test-0"
writer: "true" => <computed>


Plan: 1 to add, 1 to change, 1 to destroy.

在运行 terraform apply 时出现以下错误:

aws_rds_cluster.test: Modifying... (ID: test)
engine_version: "9.6.9" => "10.7"
aws_rds_cluster_instance.test_cluster_instances: Still destroying... (ID: test-0, 10s elapsed)
aws_rds_cluster_instance.test_cluster_instances: Still destroying... (ID: test-0, 3m40s elapsed)
aws_rds_cluster_instance.test_cluster_instances: Still destroying... (ID: test-0, 3m50s elapsed)
...
...
aws_rds_cluster_instance.test_cluster_instances: Destruction complete after 3m54s


Error: Error applying plan:

1 error(s) occurred:


* aws_rds_cluster.test: 1 error(s) occurred:

* aws_rds_cluster.test: Failed to modify RDS Cluster (test): InvalidParameterCombination: Cannot upgrade aurora-postgresql from 9.6.9 to 10.7
status code: 400, request id: c24c4c06-3d98-4ca3-ae95-bf3fd4150959

最佳答案

AWS 文档不是很清楚,但目前无法在 Aurora 上进行主要版本升级,例如您可以从 9.6.9 升级到 9.6.12,但您不能从 9.6.9 升级到 10.7,除非转储所有数据,创建一个新的 10.7 实例并在那里恢复它。

亚马逊声称他们正在研究升级路径,但他们拒绝透露何时可用,可能会在今年的 Re:Invent 上宣布,明年甚至更晚。

这很可悲,因为当我们谈论 9.6.9 时,PostgreSQL 12.0 刚刚发布。

坦率地说,我不会将 RDS 用于任何重要的事情,它总是落后于功能(现在落后 3 个主要版本),你只能使用亚马逊批准的扩展,故障转移和流备份的解决方案在并且是开源的。使用 RDS/Aurora 的唯一原因是它的管理,但是在操作中,PG(不像 mysql)非常可靠我不记得它有任何问题。它可能需要一些调整设置,但 RDS/Aurora 也不会让您摆脱这些。

关于postgresql - 无法将 aurora-postgresql 从 9.6.9 升级到 10.7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56425050/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com