Re: POC: Parallel processing of indexes in autovacuum
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Daniil Davydov <3danissimo@gmail.com>
Cc: Alexander Korotkov <aekorotkov@gmail.com>, SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
Sami Imseih <samimseih@gmail.com>, Matheus Alcantara <matheusssilv97@gmail.com>,
Maxim Orlov <orlovmg@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-07T07:49:57Z
Lists: pgsql-hackers
On Sat, Apr 4, 2026 at 1:38 AM Daniil Davydov <3danissimo@gmail.com> wrote: > > Hi, > > On Sat, Apr 4, 2026 at 8:12 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > > > Regarding the regression tests, ISTM we no longer need > > 'autovacuum-leader-before-indexes-processing' injection point since it > > currently tests that parallel workers update their delay parameters > > during the initialization (i.e., in parallel_vacuum_main()). In order > > to verify the behavior of workers updating their delay parameters > > while processing indexes, we would need another injection ponit to > > stop parallel workers, which seems overkill to me. So I removed it but > > the test still covers the propagation logic. > > > > Regarding the patch, I don't think it's a good idea to include > > bgworker_internals.h from reloptions.c: > > > > I'd leave the maximum value as 1024. > > OK, let's leave it. > > > > > I've attached patch and please check it. I think it's a good shape and > > I'm going to push it next Monday barrying objections. > > > > Thank you for updating the patch! > All changes look good to me. Thank you! Pushed. > BTW, what about the "opt-in vs. opt-out style" issue? > As I wrote here [1], we can consider a new approach - allow the user to set the > autovacuum_max_workers reloption even if GUC parameter is zero. > I think it can satisfy all possible use cases. I've just replied to the email. Please check it[1]. Regards, [1] https://www.postgresql.org/message-id/CAD21AoDEfe5-tYSqa%3DMGLP5TX5QH2irVZVyULCeTQj0J92Hp1A%40mail.gmail.com -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Allow autovacuum to use parallel vacuum workers.
- 1ff3180ca016 19 (unreleased) landed
-
Add parallel vacuum worker usage to VACUUM (VERBOSE) and autovacuum logs.
- adcdbe93860b 19 (unreleased) landed
-
doc: Put new options in consistent order on man pages
- bc35adee8d7a 18.0 cited