Обсуждение: VACUUM (INDEX_CLEANUP OFF) and GIN indexes

Поиск
Список
Период
Сортировка

VACUUM (INDEX_CLEANUP OFF) and GIN indexes

От
Christophe Pettus
Дата:
Does VACUUM (INDEX_CLEANUP OFF) flush the pending list for GIN indexes, or is that skipped as well?


Re: VACUUM (INDEX_CLEANUP OFF) and GIN indexes

От
Peter Geoghegan
Дата:
On Tue, Apr 25, 2023 at 9:18 AM Christophe Pettus <xof@thebuild.com> wrote:
> Does VACUUM (INDEX_CLEANUP OFF) flush the pending list for GIN indexes, or is that skipped as well?

It's skipped by VACUUM, but not by ANALYZE. So if you're using the
reloption version of index_cleanup=off, it isn't necessarily going to
stop autovacuum/autoanalyze from doing pending list cleanup.

The ANALYZE pending list cleanup path has some problems:

https://postgr.es/m/CAH2-WzkjrK556enVtFLmyXEdw91xGuwiyZVep2kp5yQT_-3JDg@mail.gmail.com


--
Peter Geoghegan



Re: VACUUM (INDEX_CLEANUP OFF) and GIN indexes

От
Christophe Pettus
Дата:

> On Apr 25, 2023, at 09:35, Peter Geoghegan <pg@bowt.ie> wrote:
>
> It's skipped by VACUUM, but not by ANALYZE. So if you're using the
> reloption version of index_cleanup=off, it isn't necessarily going to
> stop autovacuum/autoanalyze from doing pending list cleanup.

Ugh, thanks.  I wasn't aware that it was flushed by ANALYZE as well.  The current algorithm for pending list flush is
kindof problematic in itself, because it relies on the highly optimistic assumption that the pending list won't grow
verymuch while the list is being flushed.