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

From Tom Lane
Subject Re: autovacuum not prioritising for-wraparound tables
Date
Msg-id 15588.1359137840@sss.pgh.pa.us
Whole thread Raw
In response to Re: autovacuum not prioritising for-wraparound tables  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: autovacuum not prioritising for-wraparound tables
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Jan 25, 2013 at 12:35 PM, Andres Freund <andres@2ndquadrant.com> wrote:
>> I don't think the first part is problematic. Which scenario do you have
>> in mind where that would really cause adverse behaviour? autovacuum
>> seldomly does full table vacuums on tables otherwise these days so
>> tables get "old" in that sense pretty regularly and mostly uniform.

> I'm worried about the case of a very, very frequently updated table
> getting put ahead of a table that needs a wraparound vacuum, but only
> just.  It doesn't sit well with me to think that the priority of that
> goes from 0 (we don't even try to update it) to infinity (it goes
> ahead of all tables needing to be vacuumed for dead tuples) the
> instant we hit the vacuum_freeze_table_age.

Well, really the answer to that is that we have multiple autovac
workers, and even if the first one that comes along picks the wraparound
job, the next one won't.

Having said that, I agree that it might be better to express the
sort priority as some sort of continuous function of multiple figures of
merit, rather than "sort by one then the next".  See Chris Browne's
mail for another variant.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: LATERAL, UNNEST and spec compliance
Next
From: Bruce Momjian
Date:
Subject: Re: Question regarding Sync message and unnamed portal