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

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

From
Michael Paquier
Date:
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(+)