Re: Disk Space issue - Mailing list pgsql-admin

From Tom Lane
Subject Re: Disk Space issue
Date
Msg-id 27795.1213147717@sss.pgh.pa.us
Whole thread Raw
In response to Re: Disk Space issue  (Devendra Singh Rawat <Devendra_Rawat@infosys.com>)
List pgsql-admin
Devendra Singh Rawat <Devendra_Rawat@infosys.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

pgsql-admin by date:

Previous
From: Devendra Singh Rawat
Date:
Subject: Re: Disk Space issue
Next
From: "Praveen Kumar \(TUV\)"
Date:
Subject: Re: Disk Space issue