pgsql: Add helper routines to retrieve data for custom fixed-numbered p

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add helper routines to retrieve data for custom fixed-numbered p
Date: 2024-08-05 02:48:03
Message-ID: E1sanlT-002iut-19@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add helper routines to retrieve data for custom fixed-numbered pgstats

This is useful for extensions to get snapshot and shmem data for custom
cumulative statistics when these have a fixed number of objects, so as
these do not need to know about the snapshot internals, aka pgStatLocal.

An upcoming commit introducing an example template for custom cumulative
stats with fixed-numbered objects will make use of these. I have
noticed that this is useful for extension developers while hacking my
own example, actually.

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/2eff9e678d350882f7a4b6ec6361927c9093051c

Modified Files
--------------
src/include/utils/pgstat_internal.h | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2024-08-05 03:09:34 pgsql: injection_points: Add some cumulative stats for injection points
Previous Message Tom Lane 2024-08-04 17:39:21 pgsql: Release notes for 16.4, 15.8, 14.13, 13.16, 12.20.