From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add PgStat_KindInfo.init_shmem_cb
Date: Thu, 11 Jul 2024 00:24:20 +0000
Message-ID: <E1sRhbg-001BFz-Os@gemulon.postgresql.org> (raw)
Add PgStat_KindInfo.init_shmem_cb
This new callback gives fixed-numbered stats the possibility to take
actions based on the area of shared memory allocated for them.
This removes from pgstat_shmem.c any knowledge specific to the types
of fixed-numbered stats, and the initializations happen in their own
files. Like b68b29bc8fec, this change is useful to make this area of
the code more pluggable, so as custom fixed-numbered stats can take
actions after their shared memory area is initialized.
Reviewed-by: Bertrand Drouvot
Discussion: https://postgr.es/m/Zot5bxoPYdS7yaoy@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/21471f18e9d9aa3383314ed8bc9163bc369109ae
Modified Files
--------------
src/backend/utils/activity/pgstat.c | 6 ++++++
src/backend/utils/activity/pgstat_archiver.c | 8 ++++++++
src/backend/utils/activity/pgstat_bgwriter.c | 8 ++++++++
src/backend/utils/activity/pgstat_checkpointer.c | 8 ++++++++
src/backend/utils/activity/pgstat_io.c | 9 +++++++++
src/backend/utils/activity/pgstat_shmem.c | 21 +++++++++++----------
src/backend/utils/activity/pgstat_slru.c | 8 ++++++++
src/backend/utils/activity/pgstat_wal.c | 8 ++++++++
src/include/utils/pgstat_internal.h | 13 +++++++++++++
9 files changed, 79 insertions(+), 10 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: Add PgStat_KindInfo.init_shmem_cb
In-Reply-To: <E1sRhbg-001BFz-Os@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