pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Change pgstat_report_vacuum() to use Relation
Date: Wed, 17 Dec 2025 02:46:48 +0000
Message-ID: <E1vVhYt-001Aga-0l@gemulon.postgresql.org> (raw)

Change pgstat_report_vacuum() to use Relation

This change makes pgstat_report_vacuum() more consistent with
pgstat_report_analyze(), that also uses a Relation.  This enforces a
policy that callers of this routine should open and lock the relation
whose statistics are updated before calling this routine.  We will
unlikely have a lot of callers of this routine in the tree, but it seems
like a good idea to imply this requirement in the long run.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Suggested-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/aUEA6UZZkDCQFgSA@ip-10-97-1-34.eu-west-3.compute.internal

Branch
------
master

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

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c         |  3 +--
src/backend/utils/activity/pgstat_relation.c | 11 +++++------
src/include/pgstat.h                         |  4 ++--
3 files changed, 8 insertions(+), 10 deletions(-)



Message-ID: <E1vVhYt-001Aga-0l@gemulon.postgresql.org>
Permalink:  ../E1vVhYt-001Aga-0l@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vVhYt-001Aga-0l@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: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Change pgstat_report_vacuum() to use Relation
  In-Reply-To: <E1vVhYt-001Aga-0l@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