wikiti
4/16/2018 - 10:40 AM

Calculate database size

Calculate the size of a given database.

-- Just run this from a psql prompt
SELECT pg_database_size('database-name');

-- For example
SELECT pg_database_size('gtclients');

-- To make it look prettier
SELECT pg_size_pretty(pg_database_size('gtclients')) AS size;