Tablespace in Postgresql
#Command to find the size of all Databases : postgres=# SELECT datname,pg_size_pretty(pg_database_size(datname)) FROM pg_database; datname | pg_size_pretty -----------------+---------------- template1 | 6393 kB template0 | 6385 kB postgres | 6501 kB test1 | 6517 kB testdb1 | 6393 kB mydb | 6501 kB foo | 6501 kB example_backups | 6517 kB # Command to find the size of all tablespaces : postgres=# SELECT spcname, pg_size_pretty(pg_tablespace_size(spcname)) FROM pg_tablespace; spcname | pg_size_pretty ------------+---------------- pg_default | 44 MB pg_global | 437 kB data_tbs | 6509 kB (3 rows) # Command to find the size of particular tablespace : postgres=# SELECT pg_size_pretty(pg_tablespace_size('data_tbs')); pg_size_pretty ---------------- 6509 kB About tablespaces in Postgresq