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)


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to