model-writtenrun 4534 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Ilia Evdokimov reported that cache eviction could move a Memoize hash entry, leaving ExecMemoize() using a stale local pointer even though cache_store_tuple() had updated node->entry #1.
- Ilia supplied a one-line fix using node->entry and a reproducer whose cache hits increased from 901 to 1000 while misses fell from 1099 to 1000 #1.
- cca5507 agreed with the analysis, approved the patch, and requested backpatching to all supported versions #2.
- David Rowley explained that the stale write could also clear an unrelated entry's complete flag outside singlerow mode, causing additional avoidable cache misses #3.
- David committed the submitted code unchanged as 3f67ce4819, with an expanded explanation and backpatches through PostgreSQL 15, then confirmed the push in the final message, leaving no outstanding patch revisions #3.