From: | Bill Moran <wmoran(at)potentialtech(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:09:50 |
Message-ID: | 20090527110950.4c0a40b3.wmoran@potentialtech.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
In response to Alexander Schöcke <asc(at)turtle-entertainment(dot)de>:
> 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? Here's the table structure:
>
> Table "public.foobar_log"
> Column | Type | Modifiers
> ------------+--------------------------+--------------------------------
> ------------+--------------------------+---------------------------
> foorbarid | integer | not null default nextval('foobar_log_id_seq'::regclass)
> created_at | timestamp with time zone | not null
> foo | character varying(50) | not null
> bar | character varying(16) | not null
> chit | integer | not null
> chat | boolean | not null default false
> Indexes:
> "bar_index" btree (bar)
> "foobarid_foobar_log_key" btree (foobarid)
> "chit_foobar_log_key" btree (chit)
>
>
> The table consists of approximately 2.4 million entries.
>
> Any help is appreciated.
What is the output of VACUUM VERBOSE foobar_log?
--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-05-27 15:15:35 | Re: Bloated Table |
Previous Message | Grzegorz Jaśkiewicz | 2009-05-27 15:07:03 | Re: Bloated Table |