From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Switch PgStat_Kind from an enum to a uint32 type
Date: Thu, 01 Aug 2024 19:51:21 +0000
Message-ID: <E1sZbpZ-002EuD-Bq@gemulon.postgresql.org> (raw)
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3188a4582a8ce8223fba6e08636d8aaa4cbfd29f
Modified Files
--------------
src/backend/utils/activity/pgstat.c | 14 +++++------
src/backend/utils/activity/pgstat_shmem.c | 2 +-
src/include/pgstat.h | 39 +++++++++++++++----------------
3 files changed, 27 insertions(+), 28 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Switch PgStat_Kind from an enum to a uint32 type
In-Reply-To: <E1sZbpZ-002EuD-Bq@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox