pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedautovacuum and dead tuples
2+ messages / 2 participants
[nested] [flat]
* autovacuum and dead tuples
@ 2013-09-18 15:42 fburgess@radiantblue.com
0 siblings, 1 reply; 2+ messages in thread
From: fburgess@radiantblue.com @ 2013-09-18 15:42 UTC (permalink / raw)
To: pgsql-performance
<html><body><span style="font-family:Verdana; color:#000000; font-size:10pt;"><div>We are running PostgreSQL 9.1.6 with autovacuum = on and I am reporting on dead tuples using the pgstattuple extension. Each time I run the pgstattuple package our dead tuples counts decrease. 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?</div><div><br mce_bogus="1"></div><div>Thanks</div><div><br></div><div><br></div></span></body></html>
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: autovacuum and dead tuples
@ 2013-09-18 16:27 Shaun Thomas <sthomas@optionshouse.com>
parent: fburgess@radiantblue.com
0 siblings, 0 replies; 2+ messages in thread
From: Shaun Thomas @ 2013-09-18 16:27 UTC (permalink / raw)
To: fburgess@radiantblue.com; pgsql-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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2013-09-18 16:27 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-09-18 15:42 autovacuum and dead tuples fburgess@radiantblue.com
2013-09-18 16:27 ` Shaun Thomas <sthomas@optionshouse.com>
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