pgsql: injection_point: Add injection_points.stats - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: injection_point: Add injection_points.stats
Date
Msg-id E1shKCd-0011pg-Bo@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
injection_point: Add injection_points.stats

This GUC controls if cumulative statistics are enabled or not in the
module.  Custom statistics require the module to be loaded with
shared_preload_libraries, hence this GUC is made PGC_POSTMASTER.  By
default, the stats are disabled.  001_stats.pl is updated to enable the
statistics, as it is the only area where these are required now.

This will be used by an upcoming change for the injection point test
added by 768a9fd5535f where stats should not be used, as the test runs a
point callback in a critical section.  And the module injection_points
will need to be loaded with shared_preload_libraries there.

Per discussion with Álvaro Herrera.

Author: Michael Paquier
Discussion: https://postgr.es/m/ZsUnJUlSOBNAzwW1@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2e35c67f956891b2dd7c30fbac9a14e76377300a

Modified Files
--------------
.../modules/injection_points/injection_points.c    | 23 ++++++++++++++++++++++
.../modules/injection_points/injection_stats.c     |  8 ++++----
.../modules/injection_points/injection_stats.h     |  3 +++
.../injection_points/injection_stats_fixed.c       |  4 ++--
src/test/modules/injection_points/t/001_stats.pl   |  7 +++++--
5 files changed, 37 insertions(+), 8 deletions(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: injection_points: Add initialization of shmem state when loading
Next
From: Michael Paquier
Date:
Subject: pgsql: Rework new SLRU test with injection points