From: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
---|---|
To: | Horst Düster <horst(dot)duester(at)sourcepole(dot)ch> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Calculation of db size |
Date: | 2019-01-21 14:22:27 |
Message-ID: | 87fttm3xlm.fsf@news-spur.riddles.org.uk |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
>>>>> "Horst" == Horst Düster <horst(dot)duester(at)sourcepole(dot)ch> writes:
Horst> Then I have a subsequent question.
Horst> Does the query
Horst> SELECT g_database_size('dbname');
Horst> take into account the storage space of the table pg_shdepend or
Horst> not?
It does not. Nor does it include the other global tables, such as
pg_database, pg_authid, etc. To get the list of global tables and their
indexes, use:
select relname from pg_class where relisshared;
The size of the global tables and indexes, which don't count towards the
size of any individual database, can be obtained with
pg_tablespace_size('pg_global'). (All global tables must be in the
pg_global tablespace, and no other tables are allowed there.)
--
Andrew (irc:RhodiumToad)
From | Date | Subject | |
---|---|---|---|
Next Message | Shreeyansh Dba | 2019-01-21 14:23:00 | Re: Calculation of db size |
Previous Message | Horst Düster | 2019-01-21 14:09:24 | Calculation of db size |