Re: POC: Parallel processing of indexes in autovacuum

From: Daniil Davydov <3danissimo(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Sami Imseih <samimseih(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Matheus Alcantara <matheusssilv97(at)gmail(dot)com>, Maxim Orlov <orlovmg(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: POC: Parallel processing of indexes in autovacuum
Date: 2026-03-16 20:54:43
Message-ID: CAJDiXgjjd1jL86B--AyRo2tDM1Wiu+7Pduwh5d0u_UM8GRugvw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, Mar 16, 2026 at 11:46 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> While both ideas can achieve our goal of this feature in general, the
> new idea doesn't require an additional layer of reserve/release logic
> on top of the existing bgworker pool, which is good. I've not tried
> coding this idea but I believe the patch can be simplified very much.
> So I agree to move to this idea.
>

OK, let's do it!

Please, see an updated set of patches. Main changes are :
0001 patch - removed all logic related to the parallel workers reserving.
0002 patch - no changes regarding v26.
0003 patch - no changes regarding v26.
0004 patch - removed all stuff related to the "test_autovacuum" extension.
Also removed 3th, 4th and 5th tests, because they were related
only to the workers reserving logic.
0005 patch - minor changes reflecting the new GUC parameter's purpose.

I have maintained the independence of the tests from the user-facing logging.
Instead of "nworkers released" logs I have added a single log at the end of
one round of parallel processing :
"av worker: finished parallel index processing with N parallel workers".
This is the only code that I added rather than deleted within the 0001 patch.

I hope I didn't miss anything.

--
Best regards,
Daniil Davydov

Attachment Content-Type Size
v27-0005-Documentation-for-parallel-autovacuum.patch text/x-patch 4.4 KB
v27-0004-Tests-for-parallel-autovacuum.patch text/x-patch 11.3 KB
v27-0002-Logging-for-parallel-autovacuum.patch text/x-patch 8.8 KB
v27-0001-Parallel-autovacuum.patch text/x-patch 9.6 KB
v27-0003-Cost-based-parameters-propagation-for-parallel-a.patch text/x-patch 11.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2026-03-16 20:59:56 Re: Emitting JSON to file using COPY TO
Previous Message Greg Burd 2026-03-16 20:51:31 Re: Expanding HOT updates for expression and partial indexes