Re: Vacuum timing in pg_stat_all_tables

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>, "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>, "Imseih (AWS), Sami" <simseih(at)amazon(dot)com>
Subject: Re: Vacuum timing in pg_stat_all_tables
Date: 2025-03-04 14:54:13
Message-ID: Z8cUFTCRFZQIFIYV@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 04, 2025 at 03:12:18PM +0100, Magnus Hagander wrote:
> In light of bb8dff9995f (add cost delay time to progress views), looking at
> the output of 30a6ed0ce4b (track per-relation time spent on vacuum and
> analyze), it struck me as a bit unclear of what the time is really showing.
>
> Do we want to do something similar for the table views? Or if not, we
> should probably at least document the effect of cost based vacuum delay on
> those timings - as in if they are including it or not (which I do believe
> they are).

I could see it being useful to have the total cost delay time in those
views. The information in the progress views goes away when vacuuming is
done, while the table views would retain it indefinitely. That being said,
I haven't judged the feasibility of adding it. I'm sure it can be done,
but I don't know whether it requires reworking commit bb8dff9995f.

> While more stats are always nice :), I think just being clear about it in
> the docs would perhaps be enough for now? Maybe just appending something
> along the line of "(including cost based delaying)"?

I think this is also a reasonable thing to do regardless of whether we add
the cost delay time to the table views.

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2025-03-04 15:02:21 Re: tests for pg_stat_progress_copy.tuples_skipped
Previous Message Andrew Dunstan 2025-03-04 14:53:16 Announcing Reelease 19 of PostgreSQL Buildfarm client