pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guido Neitzer <lists@event-s.net>
To: Karthikeyan Sundaram <skarthi98@hotmail.com>
Cc: pgsql-admin@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: growth of the database
Date: Wed, 21 Mar 2007 11:37:44 -0600
Message-ID: <AA1DDA93-3883-4E39-BDA8-B41FC4134D68@event-s.net> (raw)
In-Reply-To: <BAY131-F39F217C76C71862EB0528AB0740@phx.gbl>
References: <BAY131-F39F217C76C71862EB0528AB0740@phx.gbl>

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)




view thread (3+ messages)  latest in thread

Message-ID: <AA1DDA93-3883-4E39-BDA8-B41FC4134D68@event-s.net>
Permalink:  ../AA1DDA93-3883-4E39-BDA8-B41FC4134D68@event-s.net/
Also on:    postgresql.org/message-id/AA1DDA93-3883-4E39-BDA8-B41FC4134D68@event-s.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: lists@event-s.net, skarthi98@hotmail.com, pgsql-admin@postgresql.org
  Subject: Re: growth of the database
  In-Reply-To: <AA1DDA93-3883-4E39-BDA8-B41FC4134D68@event-s.net>
  References: <BAY131-F39F217C76C71862EB0528AB0740@phx.gbl> <AA1DDA93-3883-4E39-BDA8-B41FC4134D68@event-s.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox