model-writtenrun 6313 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported an assertion failure after dropping and recreating the cube extension and retrying a PL/pgSQL function, with a reproducer and observations spanning PostgreSQL 9.6 through master #1.
- Tom Lane initially reproduced the crash in PostgreSQL 13 but not version 14 or HEAD #2, then traced the apparent version difference to uninitialized memory and explained that plan preparation could fail after saving the plan but before initializing mod_stmt #3.
- Tom Lane rejected delaying the saved-plan assignment because it disrupted reference counting and risked leaks on errors; his patch instead tracked mod_stmt initialization separately, fixed the analogous CALL initialization hazard, documented the unsafe pattern, and added a regression test #3.
- At the thread's last message, Tom Lane planned to commit the next day barring objections and noted that backports needed careful field placement for ABI compatibility and adjustments for additional variants of the bug #3.
- The submitted patch #3 landed unchanged on July 20, 2021 as d9809bf869, with backports to all supported branches; the thread contains no subsequent patch review or unresolved revision.