Re: Disk Space issue

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Devendra Singh Rawat <Devendra_Rawat(at)infosys(dot)com>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Disk Space issue
Date: 2008-06-11 01:28:37
Message-ID: 27795.1213147717@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Devendra Singh Rawat <Devendra_Rawat(at)infosys(dot)com> writes:
> We ran the SQL to get the table which are consuming maximum space.
> The results are as shown:-
> SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;
> relname | relpages
> --------------------------------------------------+----------
> <table-1> | 52869
> <table-2> | 31267
> <table-3> | 15418
> <table-4> | 9693
> <table-5> | 6426

> But these only cover around few GB of data.

pg_class.relpages is only up-to-date as of the last VACUUM.
There's already good reason to suspect that you're not vacuuming
enough; maybe some big tables are not getting vacuumed at all.

I'd suggest having a look into the data directory to see for yourself
which are the big files. The documentation might help you:
http://www.postgresql.org/docs/8.3/static/storage.html
(IIRC, all of this except the material on tablespaces will apply
to 7.4.)

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Richard Broersma 2008-06-11 04:06:13 what gives: SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER TO UNPREPARED STATE
Previous Message Devendra Singh Rawat 2008-06-11 01:08:14 Re: Disk Space issue