pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add cost-based vacuum delay time to progress views.
Date: Tue, 11 Feb 2025 22:39:15 +0000
Message-ID: <E1thyuR-006d9L-4E@gemulon.postgresql.org> (raw)

Add cost-based vacuum delay time to progress views.

This commit adds the amount of time spent sleeping due to
cost-based delay to the pg_stat_progress_vacuum and
pg_stat_progress_analyze system views.  A new configuration
parameter named track_cost_delay_timing, which is off by default,
controls whether this information is gathered.  For vacuum, the
reported value includes the sleep time of any associated parallel
workers.  However, parallel workers only report their sleep time
once per second to avoid overloading the leader process.

Bumps catversion.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Co-authored-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Sami Imseih <samimseih@gmail.com>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>
Reviewed-by: Sergei Kornilov <sk@zsrv.org>
Discussion: https://postgr.es/m/ZmaXmWDL829fzAVX%40ip-10-97-1-34.eu-west-3.compute.internal

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bb8dff9995f2cf501376772898bcbcf58aa05cde

Modified Files
--------------
doc/src/sgml/config.sgml                      | 24 ++++++++++
doc/src/sgml/monitoring.sgml                  | 27 +++++++++++
src/backend/catalog/system_views.sql          |  6 ++-
src/backend/commands/vacuum.c                 | 64 +++++++++++++++++++++++++++
src/backend/commands/vacuumparallel.c         |  5 +++
src/backend/utils/misc/guc_tables.c           |  9 ++++
src/backend/utils/misc/postgresql.conf.sample |  1 +
src/include/catalog/catversion.h              |  2 +-
src/include/commands/progress.h               |  2 +
src/include/commands/vacuum.h                 |  3 ++
src/test/regress/expected/rules.out           |  6 ++-
11 files changed, 144 insertions(+), 5 deletions(-)



Message-ID: <E1thyuR-006d9L-4E@gemulon.postgresql.org>
Permalink:  ../E1thyuR-006d9L-4E@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1thyuR-006d9L-4E@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add cost-based vacuum delay time to progress views.
  In-Reply-To: <E1thyuR-006d9L-4E@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox