On Thu, Sep 05, 2024 at 09:25:11AM -0300, Ranier Vilela wrote:
> Please, disregard the first patch, it contains a bug.
> New version attached, v1.

These are wrong, because they are changing code paths where we know
that stats kinds should be set.  For custom stats, particularly, this
would silently skip doing something for code paths that would expect
an action to be taken.  (I thought originally about using some
elog(ERRORs) in these areas, refrained from it.)

The change in pgstat_write_statsfile() is equally unnecessary: we are
not going to write to the pgstats file an entry that we have not found
previously, as per the knowledge that these would be compiled with the
code for the builtin code, or added at startup for the custom ones.

I'd suggest to study the code a bit more.  Perhaps more documentation
is required, not sure about that yet.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to