1 year ago

#323270

test-img

Jainil Sutaria

GCP - size of CloudSQL Postgres Database logs are increasing rapidly and are not being purged

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).

database

postgresql

google-cloud-sql

postgresql-13

wal

0 Answers

Your Answer

Accepted video resources