test_custom_stats: Add test for drop of variable-sized stats kind

pgstat_drop_matching_entries() with a non-NULL callback while scanning
all the variable-numbered stats kinds had no test coverage.  d52c24b0f80
had an equivalent in the test module injection_points, that had no
coverage since the tests for custom stats kinds have been moved to
test_custom_stats.

This commit adds an equivalent coverage here by dropping all the custom
variable-sized stats entries through pgstat_drop_matching_entries().  An
extra test checking that other variable-sized stats kinds are untouched
is included.

This is a hole in the tests of v19, but it's not critical in any way so
no backpatch is done.

Author: Sami Imseih <[email protected]>
Reviewed-by: Bertrand Drouvot <[email protected]>
Reviewed-by: Michael Paquier <[email protected]>
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8e225d2ac57dd4e801e452c9398da4983c2d67b0

Modified Files
--------------
.../test_custom_stats/t/001_custom_stats.pl        | 17 ++++++++++++++++
.../test_custom_var_stats--1.0.sql                 |  5 +++++
.../test_custom_stats/test_custom_var_stats.c      | 23 ++++++++++++++++++++++
3 files changed, 45 insertions(+)

Reply via email to