Re: Parallel vacuum: workers together with leader could overrun cost budget

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: surya poondla <suryapoondla4(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Parallel vacuum: workers together with leader could overrun cost budget
Date: 2026-10-29 17:47:26
Message-ID: CALj2ACUyCAzRBVYFseRWn9r=eq3DSMaEu+MM83FMOKAjtqqNOQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, Oct 28, 2026 at 1:43 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> > I would just cap it at 1s like this:
>
> > + msec = Min(msec, Min(vacuum_cost_delay * 4 * nworkers, 1000));
>
> Sound reasonable change.

Thanks. Done that in the attached v3 patch.

> > I tend to agree with your point on not back-patching to <= PG18. As
> > mentioned upthread [1], the fact that it hasn't been reported so far
> > means it may have gone unnoticed, or everyone wanted vacuum to run
> > faster at the cost of foreground path performance.
>
> I'd like to withdraw my previous proposal to backpatch it to all
> supported versions. We haven't received any complaints about this
> behavior so far, and with the fix VACUUM could get slower after a
> minor update. So I agree to push it to v19 and master, and I think we
> should mention this behavior change in the v19 release notes.

Agreed.

> Also, I think it'd be better to update the paragraph in maintenance.sgml
> that says parallel workers use the same cost delay parameters as the
> leader, to mention that they share the cost limit.

Done.

Please find the attached v3 patch.

--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v3-0001-Parallel-vacuum-workers-together-with-leader-coul.patch application/octet-stream 7.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nikolay Samokhvalov 2026-10-29 17:55:48 Re: [GSoC 2026] - B-tree Index Bloat Reduction - Approach & Questions
Previous Message Sami Imseih 2026-10-29 17:30:08 Re: Report buffer access strategies in EXPLAIN