DBA Hub

📋Steps in this guide1/1

View tablespace info in postgres

VIEW TABLESPACE INFO IN POSTGRES:

postgresql configurationintermediate
by PostgreSQL
14 views
1

View tablespace info in postgres

VIEW TABLESPACE INFO IN POSTGRES: -- For getting size of specific tablespace:

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
postgres=#
select * from pg_tablespace;
(OR)
postgres=#
\db+
(or)
postgres=#
select pg_size_pretty(pg_tablespace_size('ts_dbaclass'));
pg_size_pretty
----------------
96 bytes
(1 row)
Pre-configured tablespaces:( these are default tablespaces)
Pg_global - > PGDATA/global - > used for cluster wide table and system catalog
Pg_default - > PGDATA/base directory - > it stores databases and relations

Comments (0)

Please to add comments

No comments yet. Be the first to comment!