Re: autovacuum: automatically propagate updated parameters - Mailing list pgsql-bugs

From Nikolay Samokhvalov
Subject Re: autovacuum: automatically propagate updated parameters
Date
Msg-id CAM527d8V7RYT3iXr2Zs8OaeKXprTVpxT3mjsynk_OA7MkMc_LA@mail.gmail.com
Whole thread
In response to Re: autovacuum: automatically propagate updated parameters  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-bugs
On Wed, Sep 23, 2026 at 5:39 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> I'm a bit concerned that adding
> WaitForParallelWorkersToFinishWithCallback() with a callback and a
> timeout might be overkill, as I don't see any usecase other than
> parallel autovacuum that needs to pass a callback.
>
> An alternative approach would be to have a function in
> vacuumparallel.c that waits for all index statuses to become
> PARALLEL_INDVAC_STATUS_COMPLETED while periodically checking for cost
> parameter updates.

Thanks for testing it. Agreed; attached v2 keeps the timed wait in
vacuumparallel.c. It uses an atomic completion count rather than polling
the index statuses while workers update them, then calls the existing
WaitForParallelWorkersToFinish() for final worker errors and WAL feedback.

On REL_19_STABLE at b73d13c3, test_autovacuum, core regression, and
isolation pass.

Nik

Attachment

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #19715: pg_restore_attribute_stats() rejects range statistics for a domain over int4multirange
Next
From: Corey Huinker
Date:
Subject: Re: BUG #19715: pg_restore_attribute_stats() rejects range statistics for a domain over int4multirange