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: Fri, 12 Dec 2025 11:58:54 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAA5RZ0uC4j2QGK85ma6bkF6YOWBrYX9J3dV2CEMg3d0CBLpHSA@mail.gmail.com>
References: <[email protected]>
<CAA5RZ0sg6gskHRgfymo9njEWuXDyn0Zwe+0bcX=nByyE7W+6bw@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CAA5RZ0vQvmatp8VAk6zroyeKDCw+QVq4XmoRNAFogQo6bJEbNQ@mail.gmail.com>
<[email protected]>
<CAA5RZ0swDCK+7M2KQip0tqUsBK3LUHd3F0ytpsKdDCfygHksKg@mail.gmail.com>
<[email protected]>
<CAA5RZ0uC4j2QGK85ma6bkF6YOWBrYX9J3dV2CEMg3d0CBLpHSA@mail.gmail.com>
On Wed, Dec 10, 2025 at 12:36:36PM -0600, Sami Imseih wrote:
> .. and after giving this more thought, I actually don't think we should
> do any validation for any of the callbacks. If an extension is writing
> to any file ( core or custom ), naturally they will want to read it back.
> Now I am not sure what these validations are protecting us against.
> Also, maybe the extension wants to just read data from the main stats
> file, I could see that use-case, perhaps.
>
> So, I am proposing removing the validation altogether. What do
> you think?
The to and from callbacks are coupled with each other, so there may be
a point in making sure that if one is defined so is the other. Now, I
have never done any enforcement for the existing from/to serialization
callbacks either because it would be quickly clear for one what needs
to be done when implementing a custom kind. So I'd agree with just
removing these checks and keep the code simpler.
FWIW, I have begun putting my hands on your patch, editing it at some
degree. I am not sure that I will be able to finish that today, but
I'm working towards getting something done.
--
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