Naming of the different stats systems / "stats collector"
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@postgresql.org, Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Date: 2022-03-08T20:53:51Z
Lists: pgsql-hackers
Hi, One thing I'm not yet happy around the shared memory stats patch is naming. Currently a lot of comments say things like: * [...] We convert to * microseconds in PgStat_Counter format when transmitting to the collector. or # - Query and Index Statistics Collector - or /* ---------- * pgstat_report_subscription_drop() - * * Tell the collector about dropping the subscription. * ---------- */ the immediate question for the patch is what to replace "collector" with. "stats subsystem" is too general, because that could be about backend_activity.c, or pg_statistic, or ... "shared memory stats" seems too focussed on the manner of storage, rather than the kind of stats. The patch currently uses "activity statistics" in a number of places, but that is confusing too, because pg_stat_activity is a different kind of stats. Any ideas? The postgresql.conf.sample section header seems particularly odd - "index statistics"? We collect more data about tables etc. A more general point: Our naming around different types of stats is horribly confused. We have stats describing the current state (e.g. pg_stat_activity, pg_stat_replication, pg_stat_progress_*, ...) and accumulated stats (pg_stat_user_tables, pg_stat_database, etc) in the same namespace. Should we try to move towards something more coherent, at least going forward? Greetings, Andres Freund
Commits
-
pgstat: store statistics in shared memory.
- 5891c7a8ed8f 15.0 landed
-
pgstat: stats collector references in comments.
- bdbd3d9064f9 15.0 landed
-
pgstat: consistent function comment formatting.
- edadf8098f4b 15.0 landed