Discrepancy in AWS RDS Storage Usage

0

Hello,

I'm currently using AWS RDS for PostgreSQL and I've encountered an issue with storage usage. My RDS instance is allocated 20 GiB of storage. However, when I check the size of my database using the pg_size_pretty(pg_database_size('my_database')) command, it reports that my database is only using around 2279 MB, which is significantly less than the total allocated storage.

I understand that the total storage usage includes not only the actual data but also system files, indexes, logs, and backups. However, it seems unusual that these elements would consume over 86% of the total storage. I have not recently deleted a large amount of data, performed a major version upgrade, or run a large batch job or heavy write operation.

Could you please help me understand why there is such a large discrepancy in storage usage? Is there a way to get a more detailed breakdown of storage usage in AWS RDS?

Thank you for your help.

1개 답변
0

Hi

Try running the following query to get the size of all the databases in the instance:

SELECT pg_database.datname, pg_database_size(pg_database.datname) AS size FROM pg_database;

Cheers Tony

AWS
답변함 7달 전
  • Thanks, actually there were some databases that i forgot about and were not in use, but they only added up to around 50Mbs.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠