Re: [HACKERS] Block level parallel vacuum
От | Sergei Kornilov |
---|---|
Тема | Re: [HACKERS] Block level parallel vacuum |
Дата | |
Msg-id | 12150251578571304@myt4-a1257bff88cb.qloud-c.yandex.net обсуждение исходный текст |
Ответ на | Re: [HACKERS] Block level parallel vacuum (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: [HACKERS] Block level parallel vacuum
Re: [HACKERS] Block level parallel vacuum |
Список | pgsql-hackers |
Hello I noticed that parallel vacuum uses min_parallel_index_scan_size GUC to skip small indexes but this is not mentioned in documentationfor both vacuum command and GUC itself. + /* Determine the number of parallel workers to launch */ + if (lps->lvshared->for_cleanup) + { + if (lps->lvshared->first_time) + nworkers = lps->nindexes_parallel_cleanup + + lps->nindexes_parallel_condcleanup - 1; + else + nworkers = lps->nindexes_parallel_cleanup - 1; + + } + else + nworkers = lps->nindexes_parallel_bulkdel - 1; (lazy_parallel_vacuum_indexes) Perhaps we need to add a comment for future readers, why we reduce the number of workers by 1. Maybe this would be cleaner? + /* Determine the number of parallel workers to launch */ + if (lps->lvshared->for_cleanup) + { + if (lps->lvshared->first_time) + nworkers = lps->nindexes_parallel_cleanup + + lps->nindexes_parallel_condcleanup; + else + nworkers = lps->nindexes_parallel_cleanup; + + } + else + nworkers = lps->nindexes_parallel_bulkdel; + + /* The leader process will participate */ + nworkers--; I have no more comments after reading the patches. regards, Sergei
В списке pgsql-hackers по дате отправления: