Tuesday, June 10, 2008

Re: [ADMIN] Disk Space issue

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

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

No comments: