RDS reporting a lot more disk space than Postgresql

0

Hello,

My RDS instance (t2.medium running Postgresql) has been reporting a high drop in free disk space and I can't quite grasp why.
As you can see from the plot (RDS Free Disk Space over the last 4 weeks) below, it suddenly spiked around the 23rd April.
https://imgur.com/6KT6uDn.png
The spike seen on the 28th is a result of both increased disk allocation for the RDS instance and of purging around 100gb of data.

In fact, around the 23rd, we reprocessed a portion of the database (read up to 250GB from one table, and rewrote 24GB on another table, this process went on slowly for around 5 days). The process as since then stopped, but this rate continued.

I've confirmed in pg_stat_activity, that there's no additional inserts going on, so there's no application level process still inserting or updating data.
In fact, the sum of all database disk usage reported by Postgresql is around 675 GB (querying from pg_database_size and excluding rsadmin database, to which I have no access to by default), which is a bit off from what is being reported in the RDS dashboard (999GB allocated and 180GB free would be around 819GB)

What I get from this is that my RDS instance is getting less and less free space, but that space isn't being used by Postgresql? Or is it being used in a VACUUM operation that I can't see?

Appreciate any help, thanks in advance.

Edited by: jeanlucpicard on Apr 30, 2021 8:33 AM

已提問 3 年前檢視次數 1634 次
1 個回答
1

After following this guide https://aws.amazon.com/premiumsupport/knowledge-center/diskfull-error-rds-postgresql/, I was able to detect an inactive replication slot that was filling up this space that I reported.

Following the instructions in the link to list the replication slot and drop it with pg_drop_replication_slot(). The space was instantly released.

I'm still not sure why this replication slot popped up, but I figure it should be related to the heavy operations I was performing.

已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南