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

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
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 19:09:14
Message-ID: CAA5RZ0tST1=piXSQwRn2y+YB-VwS+Dtr0Wk27Dw7ED+Xp6qSXQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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.

Thanks for getting these committed!

I rebased the custom callbacks patch in v5.

One very minor thing from the earlier commits that I corrected here is
the test for entry 2 after a clean restart.

-is($result, "entry1|2", "variable-sized stats persist after clean restart");
+is($result, "entry1|2|Test entry 1", "variable-sized stats persist
after clean restart");
+
+$result = $node->safe_psql('postgres', q(select * from
test_custom_stats_var_report('entry2')));
+is($result, "entry2|3|Test entry 2", "variable-sized stats persist
after clean restart");
+

--
Sami Imseih
Amazon Web Services (AWS)

Attachment Content-Type Size
v5-0001-Allow-cumulative-statistics-to-serialize-auxiliar.patch application/octet-stream 27.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-12-08 19:16:28 Re: Add wait event for CommitDelay
Previous Message Robert Haas 2025-12-08 19:06:35 Re: plan shape work