AWS PostgreSQL RDS:可用存储增加超过 10GB Space,但没有删除任何数据

AWS PostgreSQL RDS: more than 10GB increase in Freeable Storage Space without any data removed

在监控我的 Amazon PostgreSQL RDS (db.t2.small) 指标时,我注意到免费存储量突然增加 Space。这看起来有些令人担忧,因为这意味着更多 10 GB 的 space 被删除。查资料的时候,一切都还在。

有没有人以前遇到过这种情况并且可以解释为什么会这样?

Postgres 有一个 'autovacuum' 功能,用于回收未使用的 space。

所有 AWS RDS Postgres 实例现在都默认启用此功能,因此如果您的所有数据仍然存在,很有可能这就是为您带来更多免费 space 的原因:

The autovacuum feature for PostgreSQL databases is a feature that we strongly recommend you use to maintain the health of your PostgreSQL DB instance. Autovacuum automates the execution of the VACUUM and ANALYZE command; using autovacuum is required by PostgreSQL, not imposed by Amazon RDS, and its use is critical to good performance. The feature is enabled by default for all new Amazon RDS PostgreSQL DB instances, and the related configuration parameters are appropriately set by default.

关于 PostGres autovacuum 的更多信息:

https://www.postgresql.org/docs/9.2/static/routine-vacuuming.html