Switch PgStat_Kind from an enum to a uint32 type
Michael Paquier <michael@paquier.xyz>
Switch PgStat_Kind from an enum to a uint32 type A follow-up patch is planned to make cumulative statistics pluggable, and using a type is useful in the internal routines used by pgstats as PgStat_Kind may have a value that was not originally in the enum removed here, once made pluggable. While on it, this commit switches pgstat_is_kind_valid() to use PgStat_Kind rather than an int, to be more consistent with its existing callers. Some loops based on the stats kind IDs are switched to use PgStat_Kind rather than int, for consistency with the new time. Author: Michael Paquier Reviewed-by: Dmitry Dolgov, Bertrand Drouvot Discussion: https://postgr.es/m/Zmqm9j5EO0I4W8dx@paquier.xyz
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/activity/pgstat.c | modified | +7 −7 |
| src/backend/utils/activity/pgstat_shmem.c | modified | +1 −1 |
| src/include/pgstat.h | modified | +19 −20 |
Discussion
- Pluggable cumulative statistics 43 messages · 2024-06-13 → 2024-08-05