postgres get size of database code example Example: postgres get size of database SELECT pg_size_pretty( pg_database_size('dbname') );