GCP - CloudSQL Postgres 数据库日志的大小快速增加且未被清除
我目前正在使用 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_decoding | On |
cloudsql.enable_pgological | On |
我尝试运行 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.
Flag | Value |
---|---|
cloudsql.logical_decoding | On |
cloudsql.enable_pglogical | On |
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论