Change pgstat_report_vacuum() to use Relation
Michael Paquier <michael@paquier.xyz>
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
| Path | Change | +/− |
|---|---|---|
| src/backend/access/heap/vacuumlazy.c | modified | +1 −2 |
| src/backend/utils/activity/pgstat_relation.c | modified | +5 −6 |
| src/include/pgstat.h | modified | +2 −2 |
Discussion
- Change the signature of pgstat_report_vacuum() so that it's passed a Relation 8 messages · 2025-12-16 → 2025-12-17