How do you find the disk size of a Postgres / PostgreSQL table and its indexes

I’m coming to Postgres from Oracle and looking for a way to find the table and index size in terms of bytes/MB/GB/etc, or even better the size for all tables. In Oracle I had a nasty long query that looked at user_lobs and user_segments to give back an answer.

I assume in Postgres there’s something I can use in the information_schema tables, but I’m not seeing where.

9 Answers
9

Leave a Comment