Search code examples
postgresqlamazon-web-servicesamazon-rds

AWS Postgres RDS Disk Usage Spikes. Free disk space randomly goes down to 0


AWS Postgres RDS Disk Usage Spikes. The Free disk space randomly goes down to 0.

enter image description here

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?


Solution

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