diff options
author | Andres Freund <andres@anarazel.de> | 2022-03-20 19:12:09 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2022-03-20 19:12:09 -0700 |
commit | bff258a2732e3f8cf94010345c4ad37f8f9b5899 (patch) | |
tree | 3f9f80562a67294881ddf63e2acd12b1bd476241 /src/backend/postmaster/pgstat.c | |
parent | 8363102009d8ee64255ad4948183f9d159eb8f4b (diff) | |
download | postgresql-bff258a2732e3f8cf94010345c4ad37f8f9b5899.tar.gz postgresql-bff258a2732e3f8cf94010345c4ad37f8f9b5899.zip |
pgstat: rename pgstat_initstats() to pgstat_relation_init().
The old name was overly generic. An upcoming commit moves relation stats
handling into its own file, making pgstat_initstats() look even more out of
place.
Author: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/20220303021600.hs34ghqcw6zcokdh@alap3.anarazel.de
Diffstat (limited to 'src/backend/postmaster/pgstat.c')
-rw-r--r-- | src/backend/postmaster/pgstat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 62411313af0..e90b456006b 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -188,7 +188,7 @@ static bool pgStatRunningInCollector = false; * for the life of the backend. Also, we zero out the t_id fields of the * contained PgStat_TableStatus structs whenever they are not actively in use. * This allows relcache pgstat_info pointers to be treated as long-lived data, - * avoiding repeated searches in pgstat_initstats() when a relation is + * avoiding repeated searches in pgstat_relation_init() when a relation is * repeatedly opened during a transaction. */ #define TABSTAT_QUANTUM 100 /* we alloc this many at a time */ @@ -2147,7 +2147,7 @@ pgstat_end_function_usage(PgStat_FunctionCallUsage *fcu, bool finalize) /* ---------- - * pgstat_initstats() - + * pgstat_relation_init() - * * Initialize a relcache entry to count access statistics. * Called whenever a relation is opened. @@ -2159,7 +2159,7 @@ pgstat_end_function_usage(PgStat_FunctionCallUsage *fcu, bool finalize) * ---------- */ void -pgstat_initstats(Relation rel) +pgstat_relation_init(Relation rel) { Oid rel_id = rel->rd_id; char relkind = rel->rd_rel->relkind; |