| 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-15 00:55:43 |
| Message-ID: | aT9cjx1fgtXyCKZG@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sat, Dec 13, 2025 at 06:33:41PM -0600, Sami Imseih wrote:
> I just remembered that we should document the new callbacks in [0] with a
> brief explanation of their purpose and a reference to test_custom_stats
> as an example of usage. What do you think?
I'd rather keep the documentation simpler, pointing only to the
code templates we have and pgstat_internal.h. One reason is that code
in the documentation tends to rot very easily, particularly when
applied to plugin APIs. If you think that some of the callbacks of
pgstat_internal.h deserve more documentation or explanation, let's do
that directly in the header.
Saying that, I have tweaked a bit more the patch this morning and
applied the result after splitting things in two: one for the core
backend changes and one for the tests of the new APIs. Some comments
and error strings have been simplified and I have noticed some more
inconsistencies after a follow-up read.
Another thing that I did not like is the use of "long" for the offset,
which is not portable. We have a drop-in portable replacement for
seeks and offsets: fseeko() and pgoff_t. That was in the test code,
but still let's keep things more portable in the long run without a
4-byte limitation on WIN32.
I guess that we are done for this thread then.
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2025-12-15 01:17:45 | Re: Proposed mid-cycle update of typedefs.list |
| Previous Message | Peter Smith | 2025-12-15 00:25:55 | Re: DOCS - Clarify the publication 'publish_via_partition_root' default value. |