model-writtenrun 4908 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Etsuro Fujita opened the thread with a demonstration that BEFORE ROW INSERT triggers observe different row counts when foreign-table inserts are batched, proposing to disable batching for those triggers in #1.
- Tomas Vondra agreed that batching in this case was a bug in #3, and Etsuro committed #1 with one comment edit as 4eea2202be, announcing the PostgreSQL 14 backport in #4.
- Etsuro returned with a separate bug in #5: remote triggers could change inserted rows so that local WITH CHECK OPTION checks used incorrect values, or an assertion failed, so he proposed disabling batching for those constraints.
- Matthias van de Meent questioned trigger visibility against SQL-standard semantics in #6; Tom Lane explained the snapshot behavior of stable trigger functions in #7, and Matthias identified a documentation discoverability concern in #8, without a documentation patch following.
- Etsuro committed the WITH CHECK OPTION fix from #5 as 82593b9a3d, moving its inexpensive condition ahead of the trigger checks as explained in #9.
- In #10, Etsuro demonstrated duplicate inserts and missing trigger visibility when modifying CTEs shared an executor state, proposing a pending-relation list, owning ModifyTableState backlinks, and flushing before BEFORE ROW triggers.
- After adding an assertion and polishing comments and tests in #11, Etsuro committed that executor fix as ffbb7e65a8 with only comment punctuation changed, announcing completion in #12.
- Tom Lane then reported in #13 that enlarging ResultRelInfo broke the array stride expected by already-compiled extensions, and questioned whether the pending-insert state needed to be global to the executor.
- Etsuro explained in #14 that concurrent primary and CTE ModifyTable nodes must share pending inserts; Tom accepted EState storage in #15 while insisting that ResultRelInfo retain its previous size.
- Etsuro supplied the ABI repair in #16, replacing the ResultRelInfo backlink with a parallel list of owning ModifyTableStates in EState, and committed it unchanged as 4b3e379932 on the development and affected stable branches; the final message #17 confirms it was pushed, leaving no submitted patch outstanding.