Hi,
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote:
> I'm fine leaving 0002 here for the record, since I haven't
> reviewed it in depth and I don't think it has had a close review yet,
I ran v3 0001+0002 on REL_19_STABLE (407687a0fb1), with assertions and
injection points. 001_parallel_autovacuum.pl and
003_cost_reload_while_waiting.pl passed 10 runs out of 10.
As a control I removed only the SetLatch() loop that 0001 adds to
autovac_recalculate_workers_for_balance(). Then test 5 in 001 times
out waiting for parallel-autovacuum-leader-cost-updated, while 003
still passes. So 003 covers the reload path and test 5 the rebalance
path, each on its own.
The opposite case, a worker leaving the balance while the leader
waits, is not covered. I tried a test for it and could not make it
deterministic: with autovacuum_naptime = 1s the launcher starts other
workers, and one of them joining the balance wakes the leader too, so
the test passed even with the launcher's wakeup removed.
Regards,
Manu