Re: autovacuum not prioritising for-wraparound tables

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: autovacuum not prioritising for-wraparound tables
Дата
Msg-id 20130130135824.GA3355@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: autovacuum not prioritising for-wraparound tables  (Kevin Grittner <kgrittn@ymail.com>)
Ответы Re: autovacuum not prioritising for-wraparound tables  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On 2013-01-30 05:39:29 -0800, Kevin Grittner wrote:
> Andres Freund <andres@2ndquadrant.com> wrote:
> > On 2013-01-29 16:09:52 +1100, Josh Berkus wrote:
> >>
> >>> I have to admit, I fail to see why this is a good idea. There
> >>> isn't much of an efficiency bonus in freezing early (due to
> >>> hint bits) and vacuums over vacuum_freeze_table_age are
> >>> considerably more expensive as they have to scan the whole heap
> >>> instead of using the visibilitymap. And if you don't vacuum the
> >>> whole heap you can't lower relfrozenxid.  So changing
> >>> freeze_min_age doesn't help at all to avoid anti-wraparound
> >>> vacuums.
> >>>
> >>> Am I missing something?
> >>
> >> Yep.  First, you're confusing vacuum_freeze_table_age  and
> >> vacuum_freeze_min_age.
> >
> > Don't think I did. I was talking about vacuum_freeze_table_age
> > because that influences the amount of full-table scans
>
> Not any more than vacuum_freeze_min_age does.

Well, vacuum_freeze_min_age is 50m while vacuum_freeze_table_age is
150m.

> http://www.postgresql.org/docs/9.2/interactive/routine-vacuuming.html#AUTOVACUUM
>
> | a whole table sweep is forced if the table hasn't been fully
> | scanned for vacuum_freeze_table_age minus vacuum_freeze_min_age
> | transactions.
>
> So reducing vacuum_freeze_min_age not only helps minimize the
> writes that are needed when autovacuum needs to scan the entire
> heap, but also decreases the frequency of those full-table scans.

But it increases the amount of pages that are written out multiple times
because they contain tuples of different ages, in contrast to increasing
vacuum_freeze_table_age which doesn't have that problem. In combination
with full_page_writes that makes a noticeable different in total write
volume.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: sql_drop Event Trigger
Следующее
От: "MauMau"
Дата:
Сообщение: backend hangs at immediate shutdown (Re: Back-branch update releases coming in a couple weeks)