model-writtenrun 5989 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andreas Seltenreich reported a SQLsmith-triggered assertion failure on PostgreSQL 14 and supplied a reproducer inserting NaN into a BRIN-indexed float4 column in #1.
- Justin Pryzby could not reproduce the failure and requested a fuller backtrace in #2; this was investigation of the original bug, with no patch review shown.
- Tomas Vondra reproduced the failure and explained that ordinary comparisons involving NaN all return false, so both floating-point distance functions needed explicit NaN handling in #3.
- Tomas proposed distance zero between two NaNs and infinity between NaN and another value, reported that infinity handling appeared sound, and promised regression tests in #4; the thread ended with the previously omitted patch attached in #5, awaiting those tests and commit.
- Tomas subsequently committed d91353f4b2 from #5 with unchanged implementation and added NaN regression tests for both floating-point types, and the fix was backpatched to PostgreSQL 14.