From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Add PgStat_KindInfo.init_shmem_cb |
Date: | 2024-07-11 00:24:20 |
Message-ID: | E1sRhbg-001BFz-Os@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-07-11 07:24:54 | pgsql: Add a new 'F' entry type for fixed-numbered stats in pgstats fil |
Previous Message | Tom Lane | 2024-07-11 00:16:11 | pgsql: Make our back branches compatible with libxml2 2.13.x. |