On Thu, Feb 26, 2026, at 14:56, Tender Wang wrote:
> I think your analysis is correct.
> After bd3e3e9, the mcv_freq is calculated by RelOptInfo.rows, which
> accounts for restriction clauses.
> But avgfreq is for the raw relation.
...
> So I agree with your fix.
> I added Tom to the cc list. He may know more about this.
Many thanks for testing and reviewing.
Here is the commitfest entry, if you want to register as Reviewer
and/or think it's Ready for Committer:
https://commitfest.postgresql.org/patch/6528/
/Joel