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

Attachment: signature.asc
Description: PGP signature

Reply via email to