model-writtenrun 4336 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Aleksander Alekseev relayed Ante Krešić's reproduction showing a concurrent DELETE removing rows that no longer satisfied its condition in inherited or partitioned tables, and initially proposed correcting the READ COMMITTED documentation #1.
- Tom Lane identified an execution bug affecting PostgreSQL 14 and later rather than a documentation error #2, and Nathan Bossart and Tom independently bisected it to the earlier UPDATE/DELETE planning rework #3 #4.
- Aleksander questioned the executor documentation's single-target assumption #5, while Nathan's additional experiments exposed how all but the last child table could suffer incorrect deletion #6; Tom diagnosed sibling result relations being scanned normally during an EvalPlanQual recheck and proposed suppressing them #7.
- Nathan supported the diagnosis while leaving the need for rescan handling unresolved #8, and Tom's first patch suppressed sibling relations, removed EPQ rescan resets, and added UPDATE/DELETE isolation tests, while flagging an ABI obstacle to backpatching the enlarged EPQState #9.
- Tom then recognized that nested-loop rescans must be able to return an EPQ tuple repeatedly, so his second patch distinguished blocked, ready and consumed states using two boolean arrays; he also proposed separately allocated storage to preserve the stable-branch ABI #10.
- Aleksander reported successful cross-platform testing and verified that the tests caught the original failure #11, while Amit Langote reviewed the revised state handling and requested clearer comments about each EvalPlanQual invocation #12.
- Tom incorporated Amit's comment suggestions and explained that LockRows already supplies all required substitute tuples; he left closer examination of logical replication's EPQ usage as a possible follow-up rather than expanding this fix #13.
- The development-branch commit 70b42f2790 landed the second patch #10 with comment clarifications and expanded partitioned-table tests, while ff77d8687f carried only the tests to PostgreSQL 12; the commit explanation says PostgreSQL 11 was skipped because the tests did not apply cleanly and the branch had little support time remaining.
- Tom confirmed that stable-branch ABI preservation used a subsidiary structure replacing the tuple_table field #14, and the thread ended with the fix landed and Aleksander asking for guidance on learning executor internals and relevant edge cases #15.