model-writtenrun 1458 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Chao Li reported that subtraction in intarray’s binary-search comparator could overflow and produce incorrect selectivity estimates, submitting explicit comparisons and a regression test demonstrating the missed INT32_MAX lookup in #1.
- David Rowley accepted the overflow fix but proposed leaving out the regression test because he considered the issue unlikely to recur, while acknowledging the SQL demonstration’s usefulness in #2.
- David Rowley committed 4f49e4b55e from #1 with a small variable cleanup and without the regression test, backpatched through PostgreSQL 14, and announced the push in #3.
- Chao Li explained that he found the issue by inspecting the code, verified it with a small program, and accepted omitting the regression test in #4.
- After finding no similar buggy binary-search comparators, Chao Li proposed an inline follow-up using the existing pg_cmp_s32 helper in #5; the overflow fix had landed, but the thread ends without a response or demonstrated landing for this cleanup.