Change pgstat_report_vacuum() to use Relation

Michael Paquier <michael@paquier.xyz>

Commit: f4e797171eac645eeae2a5e95bf3361bb7f7f0cc
Author: Michael Paquier <michael@paquier.xyz>
Date: 2025-12-17T02:26:17Z
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

Files

Discussion