| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Change pgstat_report_vacuum() to use Relation |
| Date: | 2025-12-17 02:46:48 |
| Message-ID: | E1vVhYt-001Aga-0l@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(dot)pg(at)gmail(dot)com>
Suggested-by: Andres Freund <andres(at)anarazel(dot)de>
Reviewed-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2025-12-17 09:55:07 | pgsql: Support existing publications in pg_createsubscriber. |
| Previous Message | Noah Misch | 2025-12-17 00:14:48 | pgsql: WAL-log inplace update before revealing it to other sessions. |