Re: Space usage

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Space usage
Дата
Msg-id 4A8411160200002500029A44@gw.wicourts.gov
обсуждение исходный текст
Ответ на Space usage  (Anantha V Padmanaban <ananthin@hotmail.com>)
Список pgsql-admin
Anantha V Padmanaban <ananthin@hotmail.com> wrote:

> Version 8.1

It's generally best to give a full version number; many problems exist
in 8.1.0 that don't exist in 8.1.17.  Hopefully you're on the latest
bug fix release.

http://www.postgresql.org/support/versioning

> I am new to postgres

Then you should probably be looking at 8.3.latest or 8.4.latest, not
8.1.

> and trying to find a way to get the actual space usage of a table.
> The table size is 28GB but I have deleted a lot of rows which is
> not getting reflected. I presume the space will be reclaimed after
> the vacuum process.

A normal vacuum will free the space for reuse within the database, it
will not release it back to the OS.  To do that you would need to use
VACUUM FULL (followed by REINDEX) or CLUSTER.  These are aggressive
maintenance operations, which should not normally be needed.

> But I would like to know how much space left in the database. Is
> there anyway we can find how much space will be released after
> vacuuming process?

Someone might be able to suggest something simpler, but you can pick
an interesting query (after the comment "this was fun to write") from
the pl script here:

http://bucardo.org/nagios_postgres/

-Kevin

В списке pgsql-admin по дате отправления:

Предыдущее
От: Ray Stell
Дата:
Сообщение: VACUUM WARNING: skipping
Следующее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: Replication for R/W offline use