public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Sami Imseih <[email protected]>
Cc: Chao Li <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: [Proposal] Adding callback support for custom statistics kinds
Date: Mon, 15 Dec 2025 09:55:43 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAA5RZ0sqBonHZfwRi97Nn+sq-16Ab4wOZ8+z1PoBmhcmxHD6Dg@mail.gmail.com>
References: <CAA5RZ0vQvmatp8VAk6zroyeKDCw+QVq4XmoRNAFogQo6bJEbNQ@mail.gmail.com>
<[email protected]>
<CAA5RZ0swDCK+7M2KQip0tqUsBK3LUHd3F0ytpsKdDCfygHksKg@mail.gmail.com>
<[email protected]>
<CAA5RZ0uC4j2QGK85ma6bkF6YOWBrYX9J3dV2CEMg3d0CBLpHSA@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAA5RZ0ubfcmkkY7i07CmrkY12H8BsRXDoOutYXjYz0gsq7hm-w@mail.gmail.com>
<[email protected]>
<CAA5RZ0sqBonHZfwRi97Nn+sq-16Ab4wOZ8+z1PoBmhcmxHD6Dg@mail.gmail.com>
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
Attachments:
[application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
download
view thread (47+ messages) latest in thread
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: [Proposal] Adding callback support for custom statistics kinds
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox