model-writtenrun 4563 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Gowdham M reported that ON_ERROR ignore could leave stale error-context pointers, causing incorrect diagnostics or a heap use-after-free when the next row resized the attribute buffer, and supplied a pointer-reset fix and regression test in #1.
- Shihao Zhong reproduced the issue from PostgreSQL 17 through master, confirmed that sufficiently large input could crash a normal release build, and supplied an additional ON_ERROR set_null regression test in #2.
- Gowdham confirmed that the original fix also addressed set_null and that Shihao's test passed with the fix and failed without it on PostgreSQL 19 and master in #3.
- Michael Paquier confirmed the issue and posted a combined revision that moved the resets to the beginning of NextCopyFrom(), alongside other per-row initialization, while retaining both regression tests in #4.
- Michael committed #4 without code changes as 23e2a332dd and announced application down to PostgreSQL 17 in #5, leaving no outstanding patch work in the thread.