model-writtenrun 7610 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tomas Vondra opened the thread with the announcement that extended statistics on expressions had landed, supporting expression-based estimates and exposing expression statistics through pg_stats_ext_exprs #1.
- David Rowley reported a SQLancer crash and traced it to an out-of-bounds MCV index when a clause did not match the statistics object's columns or expressions #2.
- Tomas explained that clause selection should prevent such mismatches; Alvaro Herrera suggested checking for uninitialized values with Valgrind, while Tomas reported prior Valgrind testing and focused the investigation on clause compatibility #3 #4 #5.
- Tomas reproduced the crash with a smaller query combining an incompatible LIKE expression and compatible column predicates, then posted a compatibility guard and bounds assertion while proposing a readability refactor before committing #6.
- David tested the patch with 64 SQLancer threads without crashes for approximately 70 minutes; Tomas accepted the initial testing and noted that further testing could help after refactoring #7 #8 #9.
- Tomas committed the fix as 518442c7f3, expanding #6 with clearer clause-selection control flow, another assertion, and a regression test, then closed the thread by confirming the fix was pushed #10.