model-writtenrun 3915 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Sergei Kornilov reported that a JSON set-returning function querying a nonexistent key accumulated roughly 1.44 GB in its argument context, while filtering out missing keys avoided the excessive memory use #1.
- Tom Lane traced the problem to ExecProjectSet processing inputs whose SRF returns zero rows and attached a patch moving the argument-context reset inside the input loop #2.
- Sergei tested the patch and confirmed that it fixed his case #3.
- Tom's further investigation found that regexp_matches with a large flags argument could still leak in the expression context, so the committed fix also resets that context on loop continuation; he explained the added case and announced application to all branches in #4, covering 7ab6971c65 and its separately listed backport 237f8765df.
- Sergei acknowledged the completed fix, and the thread ended with no outstanding patch work #5.