Hello Its possible to change order of index processing by parallel leader? In v35 patchset I see following order: - start parallel processes - leader and parallel workers processed index lixt and possible skip some entries - after that parallel leader recheck index list and process the skipped indexes - WaitForParallelWorkersToFinish
I think it would be better to: - start parallel processes - parallel leader goes through index list and process only indexes which are skip_parallel_index_vacuum = true - parallel workers processes indexes with skip_parallel_index_vacuum = false - parallel leader start participate with remainings parallel-safe index processing - WaitForParallelWorkersToFinish This would be less running time and better load balance across leader and workers in case of few non-parallel and few parallel indexes. (if this is expected and required by some reason, we need a comment in code) Also few notes to vacuumdb: Seems we need version check at least in vacuum_one_database and prepare_vacuum_command. Similar to SKIP_LOCKED or DISABLE_PAGE_SKIPPING features. discussion question: difference between --parallel and --jobs parameters will be confusing? We need more description for this options? regards, Sergei