Re: autovacuum not prioritising for-wraparound tables

Jeff Janes <jeff.janes@gmail.com>

From: Jeff Janes <jeff.janes@gmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2013-01-27T20:47:20Z
Lists: pgsql-hackers
On Thu, Jan 24, 2013 at 1:57 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Hi,
>
> I have a bug pending that autovacuum fails to give priority to
> for-wraparound tables.  When xid consumption rate is high and dead tuple
> creation is also high, it is possible that some tables are waiting for
> for-wraparound vacuums that don't complete in time because the workers
> are busy processing other tables that have accumulated dead tuples; the
> system is then down because it's too near the Xid wraparound horizon.
> Apparently this is particularly notorious in connection with TOAST
> tables, because those are always put in the tables-to-process list after
> regular tables.

Is something killing off your autovacuum workers routinely, such that
they rarely reach the end of their to-do list?

Otherwise it seems like the tables would come up for vacuuming in a
cyclic fashion, staggered for each worker; and it being a circle it
shouldn't systematically matter where in it they were added.

What are the various settings for vacuuming?

Cheers,

Jeff


Commits

  1. COPY FREEZE and mark committed on fresh tables.

  2. Add vacuum_freeze_table_age GUC option, to control when VACUUM should