pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shaun Thomas <sthomas@optionshouse.com>
To: fburgess@radiantblue.com
To: pgsql-performance@postgresql.org
Subject: Re: autovacuum and dead tuples
Date: Wed, 18 Sep 2013 11:27:35 -0500
Message-ID: <5239D477.7040602@optionshouse.com> (raw)
In-Reply-To: <20130918084242.5a830134ae84016b0174832fdc1a3173.28709778ba.wbe@email11.secureserver.net>
References: <20130918084242.5a830134ae84016b0174832fdc1a3173.28709778ba.wbe@email11.secureserver.net>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 09/18/2013 10:42 AM, fburgess@radiantblue.com wrote:

> My colleague is under the impression that dead tuples are only cleaned up via vacuum
> full only, while I suggested that the autovaccum process was cleaning up
> these dead tuples. Is this true?

You are correct. Only VACUUM FULL (or CLUSTER) physically removes dead 
tuples from the table, but a regular VACUUM enters them into the free 
space map for reuse, so they wouldn't show up in the dead_tuple_count 
column in pgstattuple. It's possible your colleague was confused by the 
physical removal versus reassignment.

Keep in mind that the dead tuples are still in the table, but reusable. 
The free_space column and free_percent is a better description of table 
bloat from data turnover cleaned up by autovacuum.

-- 
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604
312-676-8870
sthomas@optionshouse.com

______________________________________________

See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (2+ messages)

Message-ID: <5239D477.7040602@optionshouse.com>
Permalink:  ../5239D477.7040602@optionshouse.com/
Also on:    postgresql.org/message-id/5239D477.7040602@optionshouse.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: sthomas@optionshouse.com, fburgess@radiantblue.com
  Subject: Re: autovacuum and dead tuples
  In-Reply-To: <5239D477.7040602@optionshouse.com>

* 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