On Tue, Sep 08, 2026 at 05:53:01PM +0800, ♂π≌26218 wrote:
> The restoration function should reject NaN, Infinity, negative
> values, and values greater than one for null_frac. It should return
> false or raise a controlled error without replacing the
> previous statistic.
Being able to inject stats, even buggy ones, is one reason why this
feature can be attractive in some cases. There are many other ways to
make the planner go crazy on arbitrary data, as far as I know.
Does your example lead to a server crash or an assertion failure? If
the answer to my last question is yes, that may be worth
strenghtening with more control of the input, but in terms of stats
injection, "incorrect" or "unexpected planner behavior" is not worth
bothering about.
--
Michael