大网数据广告活动
服务器运维问答

Storage usage steadily climbing in Postgres database managed by Google Cloud

· 52CE 我爱测

I stood up a new SQL database a few days ago on Google Cloud for testing some application. The application is fairly basic and just uses Postgres with simple tables and basic SQL queries. I noticed today that the storage usage of…

问题原文

原帖链接 · Lander · CC BY-SA 4.0

I stood up a new SQL database a few days ago on Google Cloud for testing some application. The application is fairly basic and just uses Postgres with simple tables and basic SQL queries. I noticed today that the storage usage of the database has been steadily climbing -- even when the application is not running.

Here is the storage usage for the past six hours:

Curiously my tables are all around 8mb:

     name      |       owner       |  size
---------------+-------------------+---------
 my_db         | postgres          | 8417 kB
 cloudsqladmin | cloudsqladmin     | 8249 kB
 postgres      | cloudsqlsuperuser | 8169 kB
 template1     | cloudsqlsuperuser | 8169 kB
 template0     | cloudsqladmin     | 8025 kB

Without knowing too much more, what could be going on here? There are no scheduled jobs, the DB hasn't had any custom configuration, etc. It was simply stood up, the database was created with my ORM, and some data was inserted.

已采纳解答

原帖链接 · Lander · CC BY-SA 4.0

It turns out this was caused by the Point-in-time recovery. Disabling this feature will result in storage usage dropping significantly and not rising again.

From what others have mentioned off-site, the regular 5 minute intervals of backups may be caused by point-in-time snapshots which are stored in the instance disk and would even out storage usage after about 7 days.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-07-14)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。