Re: growth of the database

From: Guido Neitzer <lists(at)event-s(dot)net>
To: Karthikeyan Sundaram <skarthi98(at)hotmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: growth of the database
Date: 2007-03-21 17:37:44
Message-ID: AA1DDA93-3883-4E39-BDA8-B41FC4134D68@event-s.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

On 21.03.2007, at 11:25, Karthikeyan Sundaram wrote:

> 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?

Be aware of linebreaks ...

[Galadriel: cug ] cug $ psql -U postgres -c "select pg_size_pretty
(pg_database_size('testdb'));"

pg_size_pretty
----------------
495 MB
(1 row)

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Brian A. Seklecki 2007-03-21 17:46:53 Re: Read-only access to a database
Previous Message Karthikeyan Sundaram 2007-03-21 17:25:51 growth of the database

Browse pgsql-sql by date

  From Date Subject
Next Message Guy Fraser 2007-03-21 20:32:26 Re: Regular Expressions
Previous Message Ezequias R. da Rocha 2007-03-21 17:37:07 Re: Regular Expressions