model-writtenrun 4487 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Kirill Reshke reported that extreme numeric values prevent BRIN index creation and proposed overflow-safe subtraction and conversion in #1, choosing approximate infinite distances instead of redesigning normalization; Tomas Vondra supported the approach and raised other distance calculations for investigation in #2.
- Kirill found a similar overflow in numrange_subdiff() that prevents analyzing extreme nummultirange values and supplied a separate fix in #3; Tomas and Kirill clarified that this was independent of BRIN in #4 and #5.
- Tomas combined and polished both fixes in #6, supplied versions using the appropriate numeric subtraction API for development and older branches, and added fixes for TID multiplication wrapping and signed interpretation of OIDs; oversized TID offsets were left unresolved, and the OID catalog change was restricted to development.
- Shihao zhong confirmed the subtraction-overflow reasoning but identified missing numeric NaN handling and the need for negative infinity when numrange_subdiff() receives reversed operands in #7; Kirill endorsed the fixes subject to those corrections in #8.
- Tomas committed the numeric BRIN portion of #6 as 78721a206d, incorporating explicit NaN behavior and regression coverage, and backpatched the fix through PostgreSQL 14.
- Tomas committed the TID portion of #6 as 252432c4cf, using double arithmetic and backpatching through PostgreSQL 14, then committed the development-only OID function, catalog wiring, and tests as 4b6735c21f.
- Tomas confirmed that all three BRIN fixes had landed and resent the remaining multirange patch with signed overflow handling and an ANALYZE regression test in #9.
- Tomas committed the remaining patch from #9 as d06ac896fa, with only formatting, comment, test-placement, and commit-message edits, backpatching through PostgreSQL 14.
- In #10, Tomas confirmed that all submitted fixes had landed and explained that the range overflow also affects GiST inserts and selectivity estimation; he omitted a negative-infinity regression test because the alternatives depended on platform-specific formatting or complicated GiST page splits, retaining positive-infinity coverage.