Re: Table Bloat still there after the Vacuum - Mailing list pgsql-general

From Bill Moran
Subject Re: Table Bloat still there after the Vacuum
Date
Msg-id 20100426105535.c124f6ee.wmoran@potentialtech.com
Whole thread Raw
In response to Table Bloat still there after the Vacuum  (akp geek <akpgeek@gmail.com>)
Responses Re: Table Bloat still there after the Vacuum  (akp geek <akpgeek@gmail.com>)
List pgsql-general
In response to akp geek <akpgeek@gmail.com>:

> Hi All -
>
>                   I have a table bloated with following details
> rows:29431 pages:516039 shouldbe:534 (966.4X) wasted size:4223016960 (3 GB)
> *
>
>                   I did  a vacuum on the database and also I did vacuumdb
> full on the table. Still there is no change. Can you please suggest if there
> is any other operation that can be done to take care of the issue

VACUUM doesn't guarantee that it will clean all the bloat out, it makes
some effort to debloat, but that's not its primary function.

VACUUM FULL will completely debloat a table, contingent on restrictions
below.  Is that what you're running?  I'm a little confused by your
comment "vacuumdb full on the table" which contradicts itself.  Please
provide the exact commands that your ran, along with the output that
resulted.

Neither type of VACUUM can debloat rows that are still in use by
transactions.  If the applications that connect to this database are
keeping transactions open for long periods, it will adversely affect
those commands' ability to clean up dead rows.

There is much more here:
http://www.postgresql.org/docs/8.4/static/routine-vacuuming.html

--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

pgsql-general by date:

Previous
From: akp geek
Date:
Subject: Table Bloat still there after the Vacuum
Next
From: Cédric Villemain
Date:
Subject: Re: Table Bloat still there after the Vacuum