Total objects per tablespace

Owner Object's type Size
guillaume index 2842624
guillaume table 2129920
guillaume table TOAST 172032
postgres index 3604480
postgres sequence 106496
postgres table 3211264
postgres table TOAST 0

SELECT rolname, CASE WHEN relkind='r' THEN 'table' WHEN relkind='i' THEN 'index' WHEN relkind='S' THEN 'sequence' WHEN relkind='t' THEN 'table TOAST' ELSE '' END AS kind, SUM(pg_relation_size(pg_class.oid)) AS total FROM pg_class, pg_roles WHERE pg_roles.oid=relowner AND relkind IN ('r', 't', 'i', 'S') GROUP BY 1, 2 ORDER BY 1, 2