| From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
|---|---|
| To: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
| Cc: | Daniel Gustafsson <daniel(at)yesql(dot)se>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Nikolay Samokhvalov <nik(at)postgres(dot)ai>, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: autovacuum: automatically propagate updated parameters |
| Date: | 2026-10-06 20:14:28 |
| Message-ID: | CAD21AoDWYaz9h3C8erxFzRGjAjpet=_SfK2UBgYtZ--d4GBwSw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Wed, Sep 30, 2026 at 2:00 AM Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> wrote:
>
> I addressed these in v5. 0001 is unchanged.
>
> > I think we could simplify the tests by
> > introducing a boolean variable, say, leader_participates
> > ...
>
> I am not convinced that this change made things simpler, but it is
> included in 0002.
I think it did; the v5 adds 3 injection points while the v4 added 4
injection points.
>
> > While not a problem with this patch, I wish wait_for_log could either return
> > the match, or at least the offset of the match, and not just the size of the
> > file. If we had that we could avoid reading excessive amounts of log data and
> > reduce the risk of buggy tests matching on the wrong part of the log.
>
> I ended up completely removing that test, it seemed redundant.
Thinking about these regression tests, I think we can simplify them
further by using a single injection point. Instead of having the
workers process the indexes while the leader waits for them, we can
stop the worker at the beginning of parallel_vacuum_main() and have
the leader process all the indexes and wait in
WaitForParallelWorkersToFinish(). That way, we can create a situation
where the leader waits in WaitForParallelWorkersToFinish() with just
one injection point. This injection point can also be reused in the
other tests being discussed[1].
Also, instead of adding a 'parallel-autovacuum-leader-cost-updated'
injection point, the leader writes a DEBUG2 log after propagating the
shared delay params.
The attached patch implements this idea and can be applied on top of
the v5-0002 patch. It also adds more comments to these tests for
better readability.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
| Attachment | Content-Type | Size |
|---|---|---|
| nocfbot_v5_masahiko.patch | text/x-patch | 10.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zsolt Parragi | 2026-10-06 21:24:08 | Re: autovacuum: automatically propagate updated parameters |
| Previous Message | Tom Lane | 2026-10-06 20:06:47 | Re: BUG #19747: pg_dump does not pin array_nulls, so restore mangles NULL array elements |