Re: autovacuum not prioritising for-wraparound tables - Mailing list pgsql-hackers

From Robert Haas
Subject Re: autovacuum not prioritising for-wraparound tables
Date
Msg-id CA+Tgmob2VBZPm2hBJj8DAf+9+G0_86sY8o+DTMB92Gy3u3_C_g@mail.gmail.com
Whole thread Raw
In response to Re: autovacuum not prioritising for-wraparound tables  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: autovacuum not prioritising for-wraparound tables  (Andres Freund <andres@2ndquadrant.com>)
Re: autovacuum not prioritising for-wraparound tables  (Christopher Browne <cbbrowne@gmail.com>)
List pgsql-hackers
On Sat, Feb 2, 2013 at 1:49 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> You're right, this doesn't work superbly well, especially for
> insert-only tables... But imo the place to fix it is not the
> priorization logic but relation_needs_vacanalyze, since fixing it in
> priorization won't prevent the BAM just the timing of it.

Agreed.

> I think scheduling a table for a partial vacuum every min_freeze * 2
> xids, even if its insert only, would go a long way of reducing the
> impact of full-table vacuums. Obviously that would require to retain the
> last xid a vacuum was executed in...

I'm not sure that min_freeze * 2 is the right value, but otherwise agreed.

I keep coming back to the idea that vacuum should have a high-priority
queue and a low-priority queue.  When stuff meets the current
thresholds, it goes into the high-priority queue.  But then there
should be a low-priority queue where we do partial vacuums of things
that meet some lower threshold - like the unfrozen portions of
insert-only tables.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: COPY FREEZE has no warning
Next
From: Simon Riggs
Date:
Subject: Re: GetOldestXmin going backwards is dangerous after all