| From: | Nikolay Samokhvalov <nik(at)postgres(dot)ai> |
|---|---|
| To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
| Cc: | Daniel Gustafsson <daniel(at)yesql(dot)se>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: autovacuum: automatically propagate updated parameters |
| Date: | 2026-09-24 04:44:54 |
| Message-ID: | CAM527d8V7RYT3iXr2Zs8OaeKXprTVpxT3mjsynk_OA7MkMc_LA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Wed, Sep 23, 2026 at 5:39 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)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 | Content-Type | Size |
|---|---|---|
| v2-0001-Refresh-autovacuum-costs-while-parallel-indexes-finish.patch | application/x-patch | 13.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Corey Huinker | 2026-09-24 05:56:29 | Re: BUG #19715: pg_restore_attribute_stats() rejects range statistics for a domain over int4multirange |
| Previous Message | Michael Paquier | 2026-09-24 04:22:10 | Re: BUG #19715: pg_restore_attribute_stats() rejects range statistics for a domain over int4multirange |