I know how to find relation and database size using pg_total_relation_size(), and pg_database_size(). But I want to find whole cluster size. Is there a way other than calculating disk space of data directory using file manager or using a query like this?
SELECT pg_size_pretty(sum(pg_database_size(datname))) AS "total databases size"
FROM pg_database;