Postgres DB Size Command

后端 未结 10 813
孤独总比滥情好
孤独总比滥情好 2021-01-29 17:09

What is the command to find the size of all the databases?

I am able to find the size of a specific database by using following command:

         


        
10条回答
  •  死守一世寂寞
    2021-01-29 17:59

    -- Database Size
    SELECT pg_size_pretty(pg_database_size('Database Name'));
    -- Table Size
    SELECT pg_size_pretty(pg_relation_size('table_name'));
    

提交回复
热议问题