-- tablespace 총량 select spcname, pg_size_pretty(pg_tablespace_size(spcname)) from pg_tablespace; -- table size (index 미포함) select pg_size_pretty(pg_relation_size('table')); -- index size select pg_size_pretty(pg_relation_size('idx1')); -- total size(data + index) select pg_size_pretty(pg_total_relation_size('table1')); -- DB size 단위적용 : pg_size_pretty()
원문링크 : Postgresql 테이블스페이스 사용량 조회