model-writtenrun 5976 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jaime Casanova reported a JSONB-related crash affecting PostgreSQL 14 and 15 in #1, and Andrew Dunstan confirmed that PostgreSQL 13 did not fail in #5.
- Tom Lane traced the crash to Memoize hashing a text cache key as JSONB in #4; David Rowley explained in #6 and #8 that RestrictInfo cached only the left operand's hash equality operator to reduce join-planning work.
- David Rowley posted an initial fix in #11 that cached both operand types' hash equality operators and selected the one corresponding to the outer expression.
- Tom Lane identified a second correctness problem in #12, #13, and #15: logically equal values such as positive and negative floating-point zero can produce different results when passed to other operators or functions, making cached results unsafe; David acknowledged this distinction in #16.
- David revised the crash fix in #17, retaining separate operator fields on master while restricting PostgreSQL 14 to matching operand types because external extensions could allocate RestrictInfo and made enlarging that structure unsafe.
- The master patch from #17 landed unchanged as 39a3105678, with the restrictive alternative backpatched to PostgreSQL 14; David explicitly stated in #19 that the logical-versus-binary equality problem remained unresolved.
- Tom objected in #20 that the backpatch was too close to the PostgreSQL 14.1 release wrap for complete buildfarm testing, and David offered to back it out in #21, but the supplied thread records no subsequent revert.
- David proposed binary cache hashing and comparison in #22 for lateral parameters and non-hashable join operators, preserving useful Memoize support instead of disabling it for those queries.
- In the final message, #23, David defended retaining logical mode where safe because always using binary mode could reduce cache hits and undermine estimates based on logical distinctness; he also explained that the new structure fields fit existing padding and requested feedback before committing.
- After the thread's final message, the binary-mode patch from #22 landed as e502150f7d with formatting cleanup and a compiler-warning suppression assignment, and was backpatched to PostgreSQL 14, completing both fixes.