Re: We want to monitor total size of database

From: Jaime Casanova <systemguards(at)gmail(dot)com>
To: Yumiko Izumi <izumi-yumiko(at)scnet(dot)co(dot)jp>
Cc: PostgreSQL Novice Mailing Group <pgsql-novice(at)postgresql(dot)org>
Subject: Re: We want to monitor total size of database
Date: 2006-01-05 06:17:01
Message-ID: c2d9e70e0601042217l75cc9cean33ab226ad25a4b65@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 1/4/06, Yumiko Izumi <izumi-yumiko(at)scnet(dot)co(dot)jp> wrote:
> Thank you for a reply.
>
> > yes... in 8.1.x there are specific functions to do this...
> >
> http://www.postgresql.org/docs/current/static/functions-admin.html#FUNCTIONS-ADMIN-DBSIZE
>
> We understand that the following is acquirable in
> pg_total_relation_size().
> *Total Size of database
>

no, this will give you the size of a table and all its indexes and toast data...

> However, now, the following is unacquirable.
> *Size of used space of the entire database

pg_database_size(name)

or you mean the size of all databases?

select sum(pg_database_size(datname)) from pg_database;

> *Size of free space of the entire database

free space? all available in disk

> *Size of fragmentation area of the entire database
>

VACUUM FULL is used to avoid fragmentation as much as possible... so i
suppose there is a way to know that...

> Is there any method of acquiring the above?
>
> Thanks.
>
>

--
Atentamente,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Yumiko Izumi 2006-01-05 06:53:56 Re: We want to monitor total size of database
Previous Message Yumiko Izumi 2006-01-05 04:01:58 Re: We want to monitor total size of database