pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: test_custom_stats: Add test for drop of variable-sized stats kin
Date: Tue, 03 Nov 2026 23:05:44 +0000
Message-ID: <E1xONZZ-000000004dA-0UVQ@gemulon.postgresql.org> (raw)

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 <samimseih.pg@gmail.com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/aufa5srSxC4pu5OF@paquier.xyz

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(+)



Message-ID: <E1xONZZ-000000004dA-0UVQ@gemulon.postgresql.org>
Permalink:  ../E1xONZZ-000000004dA-0UVQ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xONZZ-000000004dA-0UVQ@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: test_custom_stats: Add test for drop of variable-sized stats kin
  In-Reply-To: <E1xONZZ-000000004dA-0UVQ@gemulon.postgresql.org>
  References: <E1xONZZ-000000004dA-0UVQ@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox