Re: Table Bloat still there after the Vacuum

From: Bill Moran <wmoran(at)potentialtech(dot)com>
To: akp geek <akpgeek(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Table Bloat still there after the Vacuum
Date: 2010-04-26 14:55:35
Message-ID: 20100426105535.c124f6ee.wmoran@potentialtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In response to akp geek <akpgeek(at)gmail(dot)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/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Cédric Villemain 2010-04-26 15:22:54 Re: Table Bloat still there after the Vacuum
Previous Message akp geek 2010-04-26 14:43:03 Table Bloat still there after the Vacuum