Find database size

SELECT pg_database.datname as "databasename", 
pg_database_size(pg_database.datname)/1024/1024/1024 AS sizegb 
FROM pg_database ORDER by pg_database_size(pg_database.datname) DESC;

Leave a Reply

Your email address will not be published. Required fields are marked *