Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables
Date
Msg-id 20141009211829.GK7043@eldon.alvh.no-ip.org
Whole thread Raw
In response to Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables  (Kevin Grittner <kgrittn@ymail.com>)
List pgsql-hackers
Kevin Grittner wrote:

> Wouldn't we get substantially the same thing just by counting tuple
> inserts toward the autovacuum vacuum threshold?  I mean, it unless
> the table is due for wraparound prevention autovacuum, it will only
> visit pages that don't have the all-visible bit set, right?  And
> how much work would that do beyond what you're describing if none
> of the tuples are dead?

The problem is precisely what happens if there are some dead tuples, but
not enough to reach the 20% threshold: this vacuum now has to scan the
table twice and has to clean up indexes also.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Autovacuum fails to keep visibility map up-to-date in mostly-insert-only-tables
Next
From: Josh Berkus
Date:
Subject: Re: schema-only -n option in pg_restore fails