On Wed, May 6, 2020 at 11:28 AM Peter Geoghegan <p...@bowt.ie> wrote:
> This approach has an obvious disadvantage: the patch really has to
> teach *every* index AM to do something with that state (most will
> simply do no work). It seems logical to have the index AM control what
> happens, though. This allows the logic to live inside
> _bt_vacuum_needs_cleanup() in the case of nbtree, so there is only one
> place where we make decisions like this.

Also, do we really want to skip summarization of BRIN indexes? This
cleanup is rather dissimilar to the cleanup that takes place in most
other AMs -- it isn't really that related to garbage collection (BRIN
is rather unique in this respect). I think that BRIN might be an
inappropriate target for "index_cleanup off" VACUUMs for that reason.

See the explanation of how this takes place from the docs:
https://www.postgresql.org/docs/devel/brin-intro.html#BRIN-OPERATION

-- 
Peter Geoghegan


Reply via email to