| 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-21 18:28:43 |
| Message-ID: | CAM527d-GL=Jp2EJXBSnVBGPK-4XEZwWof5Cv8P0hghS_og6oAg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Thu, Aug 27, 2026 at 3:43 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> Thank you for taking care of it. The v3 patch looks good to me.
AI found one more gap while testing the committed fix on REL_19_STABLE at
b368bdd2. I haven't manually reviewed the code yet.
Once an autovacuum leader enters WaitForParallelWorkersToFinish(), SIGHUP
wakes its latch, but the loop only runs CHECK_FOR_INTERRUPTS(), leaving
ConfigReloadPending set. A cost-limit rebalance is not signalled at all. In
both cases, the leader does not publish changed cost parameters until the
parallel worker finishes.
The standalone reproducer uses 100 rows and two indexes, with no fixed
sleeps. Apply it to b368bdd2 and run:
make -C src/test/modules/test_autovacuum check \
PROVE_TESTS=t/002_cost_reload_while_waiting.pl
It fails with:
got: 'pending'
expected: 'processed'
The other attached patch adds an optional callback to the worker-finish
wait. Parallel autovacuum uses it to handle reloads and poll cost-limit
rebalancing every 100 ms; other callers keep the existing behavior. It also
adds tests for both cases to 001_parallel_autovacuum.pl.
With the fix, test_autovacuum passes, as do the core regression (239 tests)
and isolation (133 tests) suites.
The reproducer and fix patches are separate alternatives against b368bdd2,
not a series.
Nik
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Add-reproducer-for-parallel-autovacuum-reload-wait.patch | application/x-patch | 5.9 KB |
| 0001-Refresh-autovacuum-costs-while-waiting-for-parallel-.patch | application/x-patch | 14.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kirill Reshke | 2026-09-21 18:54:21 | Re: BUG #19700: PostgreSQL: an SP-GiST index on `inet` makes IPv6 rows invisible |
| Previous Message | Manuel Reyes Bravo | 2026-09-21 16:17:13 | Re: Detaching a child table makes an expression using it unrestorable |