model-writtenrun 6094 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Nawratil reported that recent minor releases returned stale row counts when a STABLE function appeared directly in a procedure's CALL arguments, while VOLATILE functions and results stored in local variables worked correctly #1.
- Tom Lane identified his earlier snapshot-management change as the cause: CALL argument expressions could require an up-to-date snapshot that was no longer supplied #2.
- Tom Lane's patch pushes a fresh snapshot during non-atomic CALL argument evaluation and pops it before invoking the procedure, avoiding snapshot-lifetime problems when the procedure commits or rolls back #3.
- The patch adds a regression test checking that successive calls observe an intervening insert; Tom Lane reported that it appeared to fix the problem but delayed pushing until the PostgreSQL 14 release-candidate freeze ended #3.
- The thread ends with that patch submission, and Tom Lane committed it unchanged later the same day as 4476bcb877, with backports through PostgreSQL 11; no independent patch review appears in the thread.