Re: Database 'template1' vacuum

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Database 'template1' vacuum
Дата
Msg-id 7326.1470674710@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Database 'template1' vacuum  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-admin
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Mon, Aug 8, 2016 at 10:43 AM, Natalie Wenz <nataliewenz@ebureau.com>
> wrote:
>> How are static tables handled? Once every row in a table is marked as
>> frozen, and there are no further inserts, deletes, updates, etc to the
>> table, does the vacuum have to do anything to that table when advancing the
>> relfrozenxid? Is there a way that the vacuum can see "Oh, this whole table
>> is frozen, my work here is done!" or does it still have to scan every page
>> (or worse, every row)?

> Seems so:
> https://wiki.postgresql.org/wiki/VacuumHeadaches

FWIW, this is due to get better in 9.6.  Per release notes:

    Avoid re-vacuuming pages containing only frozen tuples (Masahiko
    Sawada, Robert Haas, Andres Freund)

    Formerly, an anti-wraparound vacuum had to visit every page of a
    table whether or not there was anything to do there. Now, pages
    containing only already-frozen tuples are identified in the
    table's visibility map, and can be skipped by vacuum even when
    it's doing transaction wraparound prevention. This should greatly
    reduce the cost of maintaining large tables containing
    mostly-unchanging data.

            regards, tom lane


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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Database 'template1' vacuum
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Pg-Upgrade standbys via rsync... and avoid sending UNlogged data?