Re: parallel autovacuum: Propagate track_cost_delay_timing to parallel workers - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: parallel autovacuum: Propagate track_cost_delay_timing to parallel workers
Date
Msg-id CAD21AoB9JVR9EuMjQ1oXP9Fx5EHPrO45Cv8V8gqNQ8HNx9w5wg@mail.gmail.com
Whole thread
In response to parallel autovacuum: Propagate track_cost_delay_timing to parallel workers  (Sami Imseih <samimseih.pg@gmail.com>)
List pgsql-hackers
Hi,

On Fri, Sep 25, 2026 at 8:41 AM Sami Imseih <samimseih.pg@gmail.com> wrote:
>
> Hi,
>
> Here is a small patch to propagate track_cost_delay_timing to parallel
> autovacuum workers.  1ff3180ca01 propagates the cost-based delay
> parameters via PVSharedCostParams but left this one out, so a worker keeps
> the value it inherited at parallel start, and workers will not report
> sleep time if the GUC is turned on mid-flight.
>
> This only impacts delay reporting, but should be backpatched to 19 which
> introduced parallel autovacuum.
>
> CC Sawada-san and Zsolt since there is a related discussion in [1], though
> that one is about throttling.

Thank you for the report and the patch! Good catch. The patch looks
good to me overall and works as expected. I have one minor comment
though:

    int         cost_page_miss;
+   bool        track_delay_timing;
 } PVSharedCostParams;

I think using track_cost_delay_timing seems better in terms of greppability.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Parallel autovacuum: leader crashes when no DSM segment can be created
Next
From: Masahiko Sawada
Date:
Subject: Re: parallel autovacuum: Propagate track_cost_delay_timing to parallel workers