Re: Track the amount of time waiting due to cost_delay - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: Track the amount of time waiting due to cost_delay
Date
Msg-id CAFiTN-sKsfpRnSGEYp31O7QhmsYH_f9sZRuKc-S-xcWaF472Eg@mail.gmail.com
Whole thread Raw
In response to Re: Track the amount of time waiting due to cost_delay  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-hackers
On Tue, Dec 10, 2024 at 11:25 PM Nathan Bossart
<nathandbossart@gmail.com> wrote:
>
> On Mon, Dec 09, 2024 at 04:41:03PM +0000, Bertrand Drouvot wrote:
> > +       <structfield>time_delayed</structfield> <type>bigint</type>
>
> I think it's also worth considering names like total_delay and
> cumulative_delay.

+1, I vote for total_delay

> > +       Total amount of time spent in milliseconds waiting during <xref linkend="guc-vacuum-cost-delay"/>
> > +       or <xref linkend="guc-autovacuum-vacuum-cost-delay"/>. In case of parallel
> > +       vacuum the reported time is across all the workers and the leader. The
> > +       workers update the column no more frequently than once per second, so it
> > +       could show slightly old values.
>
> I wonder if it makes sense to provide this value as an interval instead of
> the number of milliseconds to make it more human-readable.  I might also
> suggest some changes to the description:
>
>         Total accumulated time spent sleeping due to the cost-based vacuum
>         delay settings (e.g., vacuum_cost_delay, vacuum_cost_limit).  This
>         includes the time that any associated parallel workers have slept, too.
>         However, parallel workers report their sleep time no more frequently
>         than once per second, so the reported value may be slightly stale.
>

This description looks good.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: Sort functions with specialized comparators
Next
From: vignesh C
Date:
Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation