pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kieren Scott <kierenscott@hotmail.com>
To: kevin.grittner@wicourts.gov
To: pgsql-admin@postgresql.org
Subject: Re: vacuum full table - internals in 8.3
Date: Tue, 5 Oct 2010 15:56:55 +0000
Message-ID: <BAY149-w444402192D6FA5523E30F3AE6D0@phx.gbl> (raw)
In-Reply-To: <4CAAFCDA0200002500036520@gw.wicourts.gov>
References: <BAY149-w240CEA9C7FB8AFC26C48B2AE6D0@phx.gbl>
	<4CAAFCDA0200002500036520@gw.wicourts.gov>


Thanks Kevin. That confirms what I've seen on 8.3.

Could you explain what causes index bloat when running vacuum full? I've 
read that index bloat can occur, but no quite sure what is going on internally.

Kieren

> Date: Tue, 5 Oct 2010 10:24:26 -0500
> From: Kevin.Grittner@wicourts.gov
> To: kierenscott@hotmail.com; pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] vacuum full table - internals in 8.3
> 
> Kieren Scott <kierenscott@hotmail.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
> 
> -- 
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
 		 	   		  =

view thread (5+ messages)  latest in thread

Message-ID: <BAY149-w444402192D6FA5523E30F3AE6D0@phx.gbl>
Permalink:  ../BAY149-w444402192D6FA5523E30F3AE6D0@phx.gbl/
Also on:    postgresql.org/message-id/BAY149-w444402192D6FA5523E30F3AE6D0@phx.gbl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: kierenscott@hotmail.com, kevin.grittner@wicourts.gov
  Subject: Re: vacuum full table - internals in 8.3
  In-Reply-To: <BAY149-w444402192D6FA5523E30F3AE6D0@phx.gbl>
  References: <BAY149-w240CEA9C7FB8AFC26C48B2AE6D0@phx.gbl> <4CAAFCDA0200002500036520@gw.wicourts.gov> <BAY149-w444402192D6FA5523E30F3AE6D0@phx.gbl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox