pgsql: injection_points: Add routine able to drop all stats

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: injection_points: Add routine able to drop all stats
Date: 2025-01-31 03:43:08
Message-ID: E1tdhvv-004Xkj-V8@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

injection_points: Add routine able to drop all stats

This serves as an example of how to use the new function introduced in
ce5c620fb625, pgstat_drop_matching_entries(), with a callback able to
filter the entries dropped.

A SQL function named injection_points_stats_drop() is added with some
tests.

Author: Lukas Fitti
Discussion: https://postgr.es/m/CAP53PkwuFbo3NkwZgxwNRMjMfqPEqidD-SggaoQ4ijotBVLJAA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a632cd354d35e1c3352061c375b4458876c9f10a

Modified Files
--------------
.../injection_points/injection_points--1.0.sql | 10 ++++++++++
src/test/modules/injection_points/injection_stats.c | 19 +++++++++++++++++++
src/test/modules/injection_points/t/001_stats.pl | 13 +++++++++++++
3 files changed, 42 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2025-01-31 05:00:52 pgsql: Raise an error while trying to acquire an invalid slot.
Previous Message Michael Paquier 2025-01-31 03:27:31 pgsql: Add pgstat_drop_matching_entries() to pgstats