Re: [Proposal] Adding callback support for custom statistics kinds

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Sami Imseih <samimseih(at)gmail(dot)com>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [Proposal] Adding callback support for custom statistics kinds
Date: 2025-12-08 06:35:23
Message-ID: aTZxqzPWr0wMVLq2@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 05, 2025 at 07:27:50PM -0600, Sami Imseih wrote:
> Attached is the new test module that replaces the custom statistics
> tests currently in the injection points tests. Under test_custom_stats, there
> are two separate modules: one for variable-amount stats and one for
> fixed-amount stats. With this, we can completely remove the
> stats-related tests and supporting code under
> src/test/modules/injection_points/.

Yes, thanks. Structurally, this is better and more flexible than what
we had originally, and I have noticed that you have copied the
original files while adding more comments and renaming a bit things:
the structure of the functions was exactly the same. Anyway, I have
worked on that for a good portion of the day, splitting the module
drop and the new module into two commits, and applied the result after
tweaking quite a few things in terms of names and comments (no
pgstat_*, a bit more "Var" and "Fixed", etc.), applying a much more
consistent set of names across the board for the functions and the
structures. This cleanup part is moved out of the way now, so that
you ease the introduction of the next pieces you are proposing.

The tests for the reset of fixed-sized stats was a nice addition,
indeed. If you have more areas that you think could be improved,
ideas are of course welcome.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mahendra Singh Thalor 2025-12-08 06:44:06 Re: Non-text mode for pg_dumpall
Previous Message Chao Li 2025-12-08 06:31:07 Re: tuple radix sort