| From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
|---|---|
| To: | Sami Imseih <samimseih(dot)pg(at)gmail(dot)com> |
| Cc: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
| Subject: | Re: parallel autovacuum: Propagate track_cost_delay_timing to parallel workers |
| Date: | 2026-09-29 03:49:34 |
| Message-ID: | CALj2ACVR=-ykNePS4iQOmPFC7oeUqAt6Ab_+EBw903hspg+LtQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Mon, Sep 28, 2026 at 5:13 PM Sami Imseih <samimseih(dot)pg(at)gmail(dot)com> wrote:
>
> > > track_cost_delay_timing gates delay timing reporting elsewhere, so we should not
> > > deviate from that. If the GUC is off by then, we should not accumulate
> > > any timing
> > > anyhow, even if parallel_vacuum_worker_delay_ns > 0
> >
> > IIUC the remaining parallel_vacuum_worker_delay_ns was accumulated
> > when the track_cost_delay_timing was enabled. Shouldn't we report it
> > as well?
>
> We could swap
> ```
> /* Report any remaining cost-based vacuum delay time */
> if (track_cost_delay_timing)
> ```
>
> with
>
> ```
> /* Report any remaining cost-based vacuum delay time */
> if (parallel_vacuum_worker_delay_ns)
> ```
>
> but I did not think that made sense. When we get to the point of reporting
> the remaining time, and the track_cost_delay_timing is disabled, then
> I don't think we should report anything.
I think it depends on how much accumulated time it will be at max from
the last report till the end of parallel_vacuum_main(). If it is in
minutes or even tens of seconds, then losing that last part would make
the reported delay time incomplete.
That said, I checked track_wal_io_timing and it reports the
accumulated timing even after the GUC is turned off, see
pgstat_count_io_op_time(). IIUC, what matters there is whether timing
was on when the start time was captured, not what it is at reporting
time. Looking at that, I would prefer reporting the remaining
accumulated time here too to make it complete.
Also, +1 to rename track_delay_timing to GUC name.
--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tristan Partin | 2026-09-29 04:04:27 | Fix out-of-bounds array indexing in JsonValueList |
| Previous Message | Hayato Kuroda (Fujitsu) | 2026-09-29 03:16:19 | RE: Fix apply worker crash when subscriber table has only a deferrable primary key |