Re: Skip index cleanup if autovacuum did not do any work

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Skip index cleanup if autovacuum did not do any work
Дата
Msg-id CAH2-WzkqOO7GGPRrmL6jKYjznCqYwhR-V5K=JMMQNfSfbb+1UQ@mail.gmail.com
обсуждение исходный текст
Ответ на Skip index cleanup if autovacuum did not do any work  (Feike Steenbergen <feikesteenbergen@gmail.com>)
Ответы Re: Skip index cleanup if autovacuum did not do any work  (Feike Steenbergen <feikesteenbergen@gmail.com>)
Список pgsql-hackers
On Tue, Nov 28, 2017 at 1:36 PM, Feike Steenbergen
<feikesteenbergen@gmail.com> wrote:
> On a server with a very frequent xid wraparound I can see that the
> anti-wraparound vacuum is finished very quickly with the heap, yet it still
> scans all the indexes, which causes it to still have to read a lot of data,
> which takes a considerable amount of time.
>
> I dove into the code a bit and as far as I can tell, all the time spent for
> doing this is is in lazy_cleanup_index.
>
> For the very specific use case of all-frozen, basically read-only tables,
> would it be ok to skip the lazy_cleanup_index call? As we are sure we did
> not touch the heap or the index, I'd say a cleanup may not be necessary.

There is a patch in the ongoing CF to do this:

https://commitfest.postgresql.org/15/952/

It's a lot harder to do this correctly than it first appears.

-- 
Peter Geoghegan


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.
Следующее
От: Feike Steenbergen
Дата:
Сообщение: Re: Skip index cleanup if autovacuum did not do any work