On 1/4/06, Yumiko Izumi <izumi-yumiko@scnet.co.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 ;)