GCP - CloudSQL Postgres 数据库日志的大小快速增加且未被清除

发布于 2025-01-16 02:36:28 字数 679 浏览 4 评论 0原文

我目前正在使用 Cloud SQL 来存储我的数据库的数据,该数据库的大小约为 14GB。然而,通过过去几周的监控,数据库的存储容量似乎一直在不断增加。当查看 WAL 日志的大小时,似乎日志占据了大部分空间 select pg_size_pretty(sum(size)) as "Total WAL disk use" from pg_ls_waldir(); 返回 119 GB。解决这个问题的最佳方法是什么?我有两个标志,并且禁用了时间点恢复。我的数据库版本是 PostgreSQL 13.4。

标志
cloudsql.ological_decodingOn
cloudsql.enable_pgologicalOn

我尝试运行 VACUUM FULL; ,但结果没有发生任何事情。最新的日志,来自运行 select * from pg_ls_waldir() order by revision Asc; 显示了创建数据库时存在的日志(3 月 13 日,7 天多前,当时我会预计日志会被清除)。

I'm currently working with Cloud SQL to store data for my database, which is around 14GB in size. However, over monitoring for the past few weeks, it seems like the storage capacity of the database has been continually increasing. When looking at the size of the WAL logs, it seems as though the logs are the things taking up most of the space select pg_size_pretty(sum(size)) as "Total WAL disk usage" from pg_ls_waldir(); returns 119 GB. What is the best way to resolve this? I have two flags, and have point in time recovery disabled. My database version is PostgreSQL 13.4.

FlagValue
cloudsql.logical_decodingOn
cloudsql.enable_pglogicalOn

I've attempted to run VACUUM FULL; but nothing happened as a result. The latest logs, from running select * from pg_ls_waldir() order by modification Asc; shows logs that exist from the creation of the database (March 13th, well over 7 days ago, which is when I would have expected the logs to purge).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文