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)