Re: growth of the database - Mailing list pgsql-sql

From Hubertus Freiherr von Fuerstenberg
Subject Re: growth of the database
Date
Msg-id 46025D0B.8060805@ise.fraunhofer.de
Whole thread Raw
In response to growth of the database  ("Karthikeyan Sundaram" <skarthi98@hotmail.com>)
List pgsql-sql
Karthikeyan Sundaram wrote:
> Hi,
> 
>     Our database is growing fast.  I want to create a cronjob that 
> should tell me what is the current size of the database on each day.
> 
>    How can I find this from the database? Is there any pre-written 
> scripts written by somebody to share?
> 

Hi,
there is an administrative function called pg_database_size(name), as in 
SELECT pg_database_size('mydb'); which returns the disk space used by 
the database with the specified name.

See Chapter 9.20.

cheers,
Hubertus
-- 
Hubertus v. Fuerstenberg                   MAIL: Fraunhofer Institute for Solar Energy Systems
Heidenhofstr.2, 79110 Freiburg, Germany                   PHONE: +49 (761) 4588 5153 FAX: +49 (761) 4588 9286
       EMAIL: hubertus.fuerstenberg@ise.fraunhofer.de --- Quis custodiet ipsos custodes? ---
 


pgsql-sql by date:

Previous
From: Richard Broersma Jr
Date:
Subject: Re: Subqueryes
Next
From: "Ezequias R. da Rocha"
Date:
Subject: Re: Subqueryes