model-writtenrun 5011 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Justin Pryzby reported a PostgreSQL 15 planner failure involving extended statistics on partitioned tables and supplied an inline examine_variable() fix to skip statistics with mismatching inheritance flags in #1.
- Richard Guo identified the same missing check when loading ndistinct statistics in #2 and attached a patch covering both paths in #3; he also mentioned a separate RangeTblEntry lookup optimization that was not included in the patches.
- Michael Paquier requested regression coverage in #4, and Richard added a test exercising both expression and ndistinct statistics in #5, leaving the implementation unchanged.
- Justin endorsed the completed patch and requested inclusion in PostgreSQL 15.1 in #6.
- Tom Lane committed #5 unchanged as f4857082bc, with a stable-branch backport, and confirmed completion in #7.
- The thread ended with the fix landed; Justin explained in #8 that accidentally recreating a partitioned table as an ordinary table had exposed the bug in his environment.