From: | Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> |
---|---|
To: | Michael Sawyers <msawyers(at)iii(dot)com> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Massive table bloat |
Date: | 2012-12-11 21:09:43 |
Message-ID: | CAL_0b1tKNmHe4Qq7fDAkpJNt2Jq8sWzKmwWtscF659x8BYuXeQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Tue, Dec 11, 2012 at 8:11 AM, Michael Sawyers <msawyers(at)iii(dot)com> wrote:
> We have a table currently using 33gb worth of space for only 152mb worth of
> data because of bad processes or autovacuum not being aggressive enough. I
> was able to confirm the size difference by doing a create table as select
> along with a second test of restoring the table from the dump file to a dev
> machine.
You can use pgcompactor (http://code.google.com/p/pgtoolkit/) to
gently reduce bloat. It does not use heavy locks, processes both
tables and indexes, determines if one is bloated and tested on 8.4.
>
>
>
> There is a very large list of foreign key relationships that I'm not
> including for the sake of brevity.
>
> The database version is 8.4.1
>
> The old DBA had said that vacuum full would take days to complete, and we
> don't have that much of a window. So I was considering using the to force
> a full table rewrite. In testing on a dev machine it only took about five
> minutes.
>
> I do not have as much hands on experience with postgres so I wanted to get
> thoughts on what is considered the proper way to deal with this kind of
> situation.
>
> Any comments would be welcome.
>
>
>
>
> --
> View this message in context: http://postgresql.1045698.n5.nabble.com/Massive-table-bloat-tp5736111.html
> Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
--
Sergey Konoplev
Database and Software Architect
http://www.linkedin.com/in/grayhemp
Phones:
USA +1 415 867 9984
Russia, Moscow +7 901 903 0499
Russia, Krasnodar +7 988 888 1979
Skype: gray-hemp
Jabber: gray(dot)ru(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Sergey Konoplev | 2012-12-11 21:12:01 | Re: Massive table bloat |
Previous Message | Michael Sawyers | 2012-12-11 21:06:11 | Re: Massive table bloat |