mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-23 14:57:03 +08:00
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
This commit is contained in:
@ -669,8 +669,8 @@ extern void pgstat_init_relation(Relation rel);
|
||||
extern void pgstat_assoc_relation(Relation rel);
|
||||
extern void pgstat_unlink_relation(Relation rel);
|
||||
|
||||
extern void pgstat_report_vacuum(Oid tableoid, bool shared,
|
||||
PgStat_Counter livetuples, PgStat_Counter deadtuples,
|
||||
extern void pgstat_report_vacuum(Relation rel, PgStat_Counter livetuples,
|
||||
PgStat_Counter deadtuples,
|
||||
TimestampTz starttime);
|
||||
extern void pgstat_report_analyze(Relation rel,
|
||||
PgStat_Counter livetuples, PgStat_Counter deadtuples,
|
||||
|
||||
Reference in New Issue
Block a user