Re: Track the amount of time waiting due to cost_delay

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Masahiro Ikeda <ikedamsh(at)oss(dot)nttdata(dot)com>, "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Track the amount of time waiting due to cost_delay
Date: 2024-12-17 05:15:06
Message-ID: Z2EI2szbYII/AWr9@ip-10-97-1-34.eu-west-3.compute.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, Dec 16, 2024 at 04:02:56PM -0600, Nathan Bossart wrote:
> On Mon, Dec 16, 2024 at 10:11:23AM +0000, Bertrand Drouvot wrote:
> > +#define PARALLEL_VACUUM_WORKER_DELAY_REPORT_INTERVAL_NS (NS_PER_S)
> >
> > Did not changed in v14, but "PARALLEL_VACUUM_REPORT_INTERVAL_NS" could be
> > an option as well. I think it keeps the key concepts while being more concise (
> > WORKER is somehow implicit in the context).
>
> I think it's important to keep "delay" somewhere in the name, so how about
> PARALLEL_VACUUM_DELAY_REPORT_INTERVAL_NS?

Yeah, sounds good to me (done in the attached).

> > -vacuum_delay_point(void)
> > +static void
> > +vacuum_delay_point_internal(bool is_analyze)
> >
> > Updated the comment on top of it accordingly.
>
> Thanks. I think we need to do some additional adjustments to this
> commentary since external callers should now use
> vacuum/analyze_delay_point().

Agree, I gave it a try in the attached.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v15-0001-Add-cost-based-delay-time-to-progress-views.patch text/x-diff 19.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2024-12-17 06:16:45 Re: [Feature Request] Schema Aliases and Versioned Schemas
Previous Message Kirill Reshke 2024-12-17 05:00:10 Re: WARNING: missing lock on database "postgres" (OID 5) @ TID (0,4)