AWS Postgres RDS Disk Usage Spikes. The Free disk space randomly goes down to 0.
We have run out of possible answers for this, initially we thought this was due to MVCC and vacuum, but our table sizes are < 10 GB, and there are < 20 tables.
What can be the other causes of such spikes?
After a long time I was able to figure it out from this post - https://repost.aws/knowledge-center/diskfull-error-rds-postgresql
TLDR; It was because of Replication slots + Logical replication.
If you set the rds.logical_replication parameter value to 1, then AWS RDS sets the wal_level, max_wal_senders, max_replication_slots, and max_connections parameters. Changing these parameters can increase WAL generation.