model-writtenrun 4748 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Robins Tharakan reported a SQLSmith-discovered assertion failure in BRIN inet distance calculation on PostgreSQL 15.1, supplying a backtrace with a negative distance but no reliable reproducer #1.
- John Naylor suggested taking an absolute difference #2, while Dmitry Dolgov argued that the inputs should already be ordered #3 and supplied a reliable reproducer using two IPv4 addresses and one IPv6 address #4.
- Tom Lane suggested floating-point roundoff could explain the failure and proposed clamping the result #5, later suspecting IPv6 specifically #7; John reproduced the crash using only the two IPv4 addresses and showed that the calculation started negative #8.
- Tomas Vondra traced the failure to negative netmask bit counts causing incorrect shifts and attached a fix clamping those counts to zero; he explained that builds without assertions could produce less efficient indexes but still correct results #9.
- Dmitry Dolgov reviewed and tested the patch successfully, finding no further failures from floating-point arithmetic or other causes #10, and later reminded Tomas that the fix remained unapplied #11.
- Tomas committed the unchanged code fix with an added regression test and polished commit message as e858312683, backpatched through PostgreSQL 14, and announced completion #12; Dmitry's final acknowledgment left no outstanding work identified in the thread #13.