列出数据库信息

列出非默认数据库的大小

postgres=# SELECT datname, pg_size_pretty(pg_database_size(datname))
FROM pg_database
WHERE datname NOT IN('postgres','template0','template1'); datname | pg_size_pretty ----------+---------------- test | 4506 MB bckupmgr | 7581 kB (2 rows)