Re: [HACKERS] Block level parallel vacuum - Mailing list pgsql-hackers

From Sergei Kornilov
Subject Re: [HACKERS] Block level parallel vacuum
Date
Msg-id 1194051575121691@vla5-4a37cde0b550.qloud-c.yandex.net
Whole thread Raw
In response to Re: [HACKERS] Block level parallel vacuum  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: [HACKERS] Block level parallel vacuum  (Mahendra Singh <mahi6run@gmail.com>)
Re: [HACKERS] Block level parallel vacuum  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
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
parallelindexes.
 
(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_SKIPPINGfeatures.
 
discussion question: difference between --parallel and --jobs parameters will be confusing? We need more description
forthis options?
 

regards, Sergei



pgsql-hackers by date:

Previous
From: Alexey Bashtanov
Date:
Subject: Re: log bind parameter values on error
Next
From: Mark Dilger
Date:
Subject: Re: Make autovacuum sort tables in descending order of xid_age