Re: Bloated Table

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: Alexander Schöcke <asc(at)turtle-entertainment(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Bloated Table
Date: 2009-05-27 15:07:03
Message-ID: 2f4958ff0905270807u154556f6u61703f4f9917051e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, May 27, 2009 at 3:54 PM, Alexander Schöcke
<asc(at)turtle-entertainment(dot)de> wrote:
> Hello everybody.
>
> I'm using a view (http://pgsql.tapoueh.org/site/html/news/20080131.bloat.html) to display the bloat (unused disk space) of the tables in a PostgreSQL database. Using this data I want to implement a database maintenance script automatically exectuting a VACUUM FULL on these tables.
> Unfortunately I am finding a table to have bloat which can't be reclaimed. I have tried VACUUM, REINDEX, VACUUM FULL ANALYZE with REINDEX, and even dump and restore. The view always shows 375MB of bloat for the table.
>
> Is this normal?
yes it is normal, if you do updates on it, and it doesn't use HOT (for
instance if you update indexed column),

now, in real life you shouldn't really ever need to vacuum full.
Reindex - yes, but not vacuum full.
Make sure, that you adjust fsm_* settings in your config, best thing
is tu run vacuum analyze verbose, and see if it warns you about it
being too small.

--
GJ

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2009-05-27 15:09:50 Re: Bloated Table
Previous Message Emanuel Calvo Franco 2009-05-27 15:00:40 Re: How to Install Postgres 8.3 in Solaris 10 as a service