/* How to calculate postgreSQL database size in disk ? */ SELECT pg_size_pretty(pg_database_size('thedbname')); /* Calculate size of a table including or excluding the index */ SELECT pg_size_pretty(pg_total_relation_size('big_table')); SELECT pg_size_pretty(pg_relation_size('big_table')); /* without index */ /* See indexes on a table with `\d tablename` */