maintenance_work_mem used by Vacuum

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема maintenance_work_mem used by Vacuum
Дата
Msg-id CAA4eK1LmcD5aPogzwim5Nn58Ki+74a6Edghx4Wd8hAskvHaq5A@mail.gmail.com
обсуждение исходный текст
Ответы Re: maintenance_work_mem used by Vacuum  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
As per docs [1] (see maintenance_work_mem), the maximum amount of memory used by the Vacuum command must be no more than maintenance_work_mem.  However, during the review/discussion of the "parallel vacuum" patch [2], we observed that it is not true.  Basically, if there is a gin index defined on a table, then the vacuum on that table can consume up to 2 * maintenance_work_mem memory space.  The vacuum can use maintenance_work_mem memory space to keep track of dead tuples and another maintenance_work_mem memory space to move tuples from pending pages into regular GIN structure (see ginInsertCleanup).   The behavior related to Gin index consuming extra maintenance_work_mem memory is introduced by commit  e2c79e14d998cd31f860854bc9210b37b457bb01.  It is not clear to me if this is acceptable behavior and if so, shouldn't we document it?

We wanted to decide how a parallel vacuum should use memory?  Can each worker consume maintenance_work_mem to clean up the gin Index or all workers should use no more than maintenance_work_mem?  We were thinking of later but before we decide what is the right behavior for parallel vacuum, I thought it is better to once discuss if the current memory usage model is right.

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: dropdb --force
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] Block level parallel vacuum