model-writtenrun 9247 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Justin Pryzby reported that creating extended statistics caused ANALYZE to fail with “tuple already updated by self” on PostgreSQL 11.3 #1, then isolated the failure to an inheritance parent and supplied a minimal reproducer #3 #4.
- Andres Freund diagnosed two attempts to store extended statistics in the same catalog row, because ordinary statistics distinguish relation-only and inherited samples while extended statistics lacked that distinction #6.
- Tom Lane supported disabling extended statistics for inheritance trees as the immediate fix, leaving proper inherited statistics for a future release because they required a catalog change #8.
- Tomas Vondra posted a patch that passed the inheritance flag into BuildRelationExtStatistics() and returned early for inherited samples; he also identified the optimizer changes and loss of the one-to-one relationship between statistics definitions and data that full support would require #13.
- Tomas confirmed that the bug affected PostgreSQL 10 onward and required a backpatchable solution #15; Andres supported the limited fix because inherited extended statistics were unused, while Dean Rasheed explained how future optimizer support could select the appropriate statistics #16 #17.
- Tomas accepted Dean's optimizer analysis and deferred full inheritance support to a PostgreSQL 13 TODO #18 #19.
- Tomas committed 14ef15a222 from #13, adding a regression test and moving the guard to the caller to avoid changing the public function's ABI; his final message confirmed that the simple fix was pushed, with full inherited extended statistics still deferred #20.