Justin Pryzby <pryzby@telsasoft.com> writes:
> On Fri, Feb 04, 2022 at 04:29:19PM -0500, Tom Lane wrote:
>> I'm confused about this bit. Are we still building bogus stats for
>> inheritance parents, or has that stopped?
> To make a long story long:
> - before 859b3003de, an ERROR occurred when a stats object was created on an
> inheritance parent.
> - To avoid the error, 859b3003de changed to no longer build "whole tree" stats
> on the table heirarchy. Non-inheried stats were still collected.
> - However, the stats were *also* applied to inherited queries (FROM tbl*).
> 36c4bc6 stops applying stats that shouldn't be applied (and doesn't change
> their collection during ANALYZE).
Got it. So we collected (and still do collect) non-inherited stats
for inheritance parents, but prior to 36c4bc6 those were mistakenly
applied in estimating both inheritance and non-inheritance queries.
Now we only do the latter.
(Since 269b532ae, this is all better in HEAD, but that's not
relevant for the back-branch release notes.)
regards, tom lane