Re: Disk usage

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: shridhar_daithankar(at)persistent(dot)co(dot)in
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Disk usage
Date: 2003-05-08 14:39:48
Message-ID: 20311.1052404788@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Shridhar Daithankar" <shridhar_daithankar(at)persistent(dot)co(dot)in> writes:
> On 8 May 2003 at 12:41, Daniel Lublin wrote:
>> I am wondering if there is some utility for postgresql, which can
>> display the amount of disk space that a database (and possibly even
>> more finer grained; a table) occupies?

> du in $PGDATA coupled with oid2name to figure out what is the object you are
> lookng at.

Or do

vacuum;
select relname, relpages * 8 from pg_class;

to get table sizes in kilobytes. relpages is not updated on-the-fly,
only by vacuum, so you need to have done vacuum recently to get
trustworthy numbers.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2003-05-08 14:40:45 Re: record new is unassigned yet
Previous Message Christopher Browne 2003-05-08 14:18:45 Re: More than one user on postgresql database on Windows ?