Space usage

--_6810b4b5-3797-4ccb-a6f0-590086bb29c2_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable


Hi All

Version 8.1

I am new to postgres 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 v=
acuum process. 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 vacuumi=
ng process?

Thanks
AP




____________________________________________________________ _____
One stop at MSN India to catch up with what=92s hot in the world around you=
today
http://in.msn.com=

--_6810b4b5-3797-4ccb-a6f0-590086bb29c2_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
..hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Verdana
}
</style>
</head>
<body class=3D'hmmessage'>
Hi All<br><br>Version 8.1<br><br>I am new to postgres 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 sp=
ace will be reclaimed after the vacuum process. But I would like to know ho=
w much space left in the database. Is there anyway we can find how much spa=
ce will be released after vacuuming process?<br><br>Thanks<br>AP<br><font s=
ize=3D"2"><span style=3D"font-family: Verdana=2CGeneva=2CArial=2CSans-serif=
=3B"><span style=3D"color: rgb(0=2C 0=2C 128)=3B font-weight: bold=3B font-=
family: Tahoma=2CHelvetica=2CSans-Serif=3B"></span><br></span></font><br><b=
r>
<hr />Match =91n=92 Make new friends with the cool match-meter. Joi=
n the Planet with you Hotmail ID. <a href=3D'http://www.WindowsLivePlanet.c=
om' target=3D'_new'>Drag n=92 drop</a></body>
</html>=

--_6810b4b5-3797-4ccb-a6f0-590086bb29c2_--
Anantha V Padmanaban [ Di, 11 August 2009 09:48 ] [ ID #2011855 ]

Re: Space usage

Anantha V Padmanaban <ananthin [at] 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

--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Kevin Grittner [ Do, 13 August 2009 20:11 ] [ ID #2012052 ]
Datenbanken » gmane.comp.db.postgresql.admin » Space usage

Vorheriges Thema: Replication for R/W offline use
Nächstes Thema: VACUUM WARNING: skipping