0

Essentially when I run

SELECT
   pg_size_pretty(SUM(pg_total_relation_size(relid))) as total_size,
   pg_size_pretty(SUM(pg_indexes_size(relid))) as index_size,
   pg_size_pretty(SUM(pg_relation_size(relid))) as actual_size
FROM pg_catalog.pg_statio_user_tables;

I get

enter image description here

And when I run

SELECT pg_size_pretty(pg_database_size(<MY_DB_NAME>));

I get

total database size

Because of this, our storage bill in RDS is massive, and I don't know what else to search for. Unfortunately, I don't have access to AWS Technical Support

9
  • Is this post: dba.stackexchange.com/questions/312473/… helpfull?
    – Martie
    Commented Sep 9 at 7:03
  • Hi, and welcome to dba.se! Why don't you have access to tech support?
    – Vérace
    Commented Sep 9 at 8:54
  • Have you tried VACUUMing your system?
    – Vérace
    Commented Sep 9 at 22:34
  • An obvious possibility is that isn't in the user table. Do you have access to query all_tables or sys_tables?
    – jjanes
    Commented Sep 10 at 20:44
  • @Vérace yes I tried VACUUM it cleared about 10GB of space Commented Sep 11 at 1:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.