Re: determining database size

From: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
To: Jeff Davis <list-pgsql-general(at)dynworks(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: determining database size
Date: 2002-04-17 20:02:02
Message-ID: Pine.LNX.4.21.0204172059280.20382-100000@ponder.fairway2k.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Wed, 17 Apr 2002, Jeff Davis wrote:

> I would just like to know how to determine the size of a database. The
> directories inside the data directory are numerical, so I can't associate
> them with a particular database or table.
>
> I would basically just like to create reports so I can determine how fast the
> disk usage is increasing.
>
> Any suggestions?

If you look at the relpages column in pg_class for the tables, etc. in your
database(s) I think you should be able to add up the storage used.

On a related note, sort of, I see in pg_database a column for datpath. Does
this indicate that we can move entire databases to other locations by changing
this field?

--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-04-17 20:33:31 Re: select users in a group?
Previous Message Joe Conway 2002-04-17 19:57:55 Re: determining database size