如何减少 Google Cloud 上 PostgreSQL 的存储大小?

How to decrease storage size for PostgreSQL on Google Cloud?

我将一些数据从 PostgreSQL 移到了 BigQuery。

之前 PostgreSQL 数据库使用 130 GB 的存储空间,现在我只需要 30GB。

但是,在 Google Cloud Console GUI 中,我仍然看到 PostgreSQL 仍在分配 130 GB 的存储空间,而其中 100GB 是空的(参见随附的屏幕截图)。

这是否意味着 Google Cloud 仍在向我收取 130GB 存储空间的费用? 我该怎么做才能摆脱未使用的存储空间 space?

目前无法reduce the storage capacity of a Cloud SQL instance. The storage allocation is permanent and cannot reduce only increased. However, there is a feature request减少云SQL实例的容量,值得关注以供将来更新。

要使用较小的存储容量,请从文档中将数据导出为 SQL dump file and then, configure a new Cloud SQL instance with the desired capacity. Then import the SQL dump file to store all your data in the new instance. To achieve efficient and less expensive imports/exports follow these best practices

无法减少 Cloud SQL 上的**所有 PostgreSQL, MySQL and SQL Server 的存储大小(容量) . 只能增加存储大小,并且GCP 仍在向您收费 130GB 存储成本.

如果您真的想将存储大小130 GB减少到30GB 云端SQL,可以从现有实例中导出数据 :

然后,将数据导入到存储大小为 30 GB 的新实例中。这样,您可以 Cloud 上的存储大小 130 GB 减少到 30GB SQL: