SELECT
tablename,
pg_size_pretty(pg_total_relation_size(quote_ident(schemaname) || '.' || quote_ident(tablename))) AS total_size
FROM
pg_tables
WHERE
schemaname NOT IN ('pg_catalog', 'information_schema')
ORDER BY
pg_total_relation_size(quote_ident(schemaname) || '.' || quote_ident(tablename)) DESC;