We have a read-only PostgreSQL RDS database which is heavily queried. We don't perform any inserts/updates/deletes during normal traffic, but still we can see how we are running out of Free Storage Space and an increase on Write IOPS metric. During this period, CPU usage is at 100%.
At some point, the storage space seems to be released.
Is this expected?
The issue was in the end related to our logs. log_statement
was set to all, where every single query to PG would be log. In order to troubleshoot long time queries, we combined log_statement
and log_min_duration_statement
.
Since this is a read only database we want to know if there is any insert/update/delete operation, so log_statement: dll
; and we want to know which queries are taking longer than 1s: log_min_duration_statement: 1000