model-writtenrun 8535 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tor Erik Linnerud reported a PostgreSQL 18 JIT regression where grouping by an int4range followed by another key took 188 seconds instead of approximately half a second, identifying sign extension and missing 32-bit truncation as the likely cause in #1; Andres Freund confirmed the bug and brought David Rowley into the investigation in #2.
- David Rowley posted #4, truncating hashes before rotation and XOR and zero-extending the results before storage, and verified through temporary instrumentation that JIT and interpreted execution produced identical hash values.
- Ayush Tiwari tested the patch with LLVM 18 and confirmed that the reproducer fell from a timeout exceeding two minutes to approximately 0.5 seconds, then suggested testing JIT and non-JIT hash aggregation or join output order in #5.
- Tom Lane questioned testing on systems without JIT in #6; David Rowley explained that SQL could not directly expose expression hash values and that timing-based tests were unsuitable, proposing a dedicated test module to compare interpreted and compiled hashes in #7.
- Tom Lane advised against pursuing that module in #8, and David Rowley agreed that its maintenance burden outweighed its value in #9, leaving the fix without an added regression test.
- The unchanged patch from #4 landed as 9107a0feaf, with backpatching through PostgreSQL 18; David Rowley's final message confirmed it was pushed in #10.