AWS:引擎名称 postgres 的存储大小无效

AWS: Invalid storage size for engine name postgres

我在亚马逊有一个 RDS 实例,我想修改分配的存储空间,它目前是 500GB,但我希望它是 50GB。但是,当我尝试在控制台中更改它时,我收到以下错误:Invalid storage size for engine name postgres and storage type standard: 60

我有一个没有与之关联的 RDS 实例的 Elasticbeanstalk 应用程序,在阅读周围后我了解到有些人需要一个与您要修改的 RDS 具有相同规格的实例,但是也没用。

这里有什么帮助吗?

不能减少为您的 RDS 分配的存储空间。它只能增加。来自 docs:

You can only increase the allocated storage. You can't reduce the allocated storage.

您必须将数据库迁移到存储空间较小的新 RDS 实例。

我 运行 进入了 You can't reduce the allocated storage 问题的一个奇怪版本。

cloudformation 中的 DBInstance 定义包括 AllocatedStorage: nnMaxAllocatedStorage: nnnn。然后我想重新部署更改 DBInstanceClass 并得到这个错误。

问题是 DB 增长超过了分配的存储空间,因此似乎通过使用原始分配的存储空间部署新实例,我试图将其减少到当前实际分配的存储空间以下。

解决方案是检查最新数据库快照的大小并用它更新 Cloudformation AllocatedStorage 属性。