model-writtenrun 1640 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Oleg Tselebrovskiy reported that a concurrent update could trigger an assertion failure during EXPLAIN ANALYZE MERGE on PostgreSQL 17 and later, supplying a two-session reproducer in #1.
- Dean Rasheed explained that one matched input row could become two unmatched actions and proposed adjusting the input node's instrumentation count rather than merely removing the assertion, attaching the executor fix in #2.
- Dilip Kumar supported reporting two rows to reflect MERGE's internal behavior and supplied an additional isolation test in #3.
- Dean Rasheed retained the instrumentation approach to preserve accurate skipped-row counts, integrated the tests into the existing merge-update suite, and filtered platform-dependent memory usage from EXPLAIN output, explaining these decisions in #4.
- The combined work landed as 1b92fe7bb9, preserving the executor logic from #2 and adapting the test contribution from #3; Dean confirmed completion and backpatching through PostgreSQL 17 in #4.