Re: vacuum full table - internals in 8.3

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Kieren Scott" <kierenscott(at)hotmail(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: vacuum full table - internals in 8.3
Date: 2010-10-05 15:24:26
Message-ID: 4CAAFCDA0200002500036520@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Kieren Scott <kierenscott(at)hotmail(dot)com> wrote:

> I'm trying to understand what is going on internally when doing a
> VACUUM FULL on a table in 8.3.
>
> I have a table that is 1GB in size, 500M is used, and 500M is free
> space. When I do a vacuum full on this table, will it either: -
>
> 1) Compact all of the used tuples into free space within the
> existing disk file and then shrink the file to 500M. Therefore
> simply freeing up 500M in the disk file.

On 8.3, this is what it will do, although it can take a very long
time. I've given up on this before completion (sometimes after
leaving it cranking away for a couple days) every time I've tried it
on a table with more than a few GB and any significant bloat. I
don't know that I've ever tried it on a table as small as you
describe, but I would bet that CLUSTER is going to be much faster if
you have the half a GB free space. Another issue with VACUUM FULL
is that it bloats indexes; so you generally need to follow it with a
REINDEX on the table.

-Kevin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2010-10-05 15:35:18 Re: Validade dump file
Previous Message Kieren Scott 2010-10-05 14:56:15 vacuum full table - internals in 8.3