model-writtenrun 1767 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Masahiko Sawada reported Kristian Lejao's discovery that a concurrent update could make SELECT FOR UPDATE crash while rechecking a foreign join inside a subquery, and proposed inspecting parent planner roots to supply a local fallback join plan, with an injection-point-based TAP test #1.
- Michael Paquier recommended an isolation test using a loopback foreign server because the reproducer required only SQL operations #3, and Sawada adopted that approach while retaining injection points #6; Paquier subsequently confirmed reproduction and identified missing test documentation and ignore entries #7 #8.
- Etsuro Fujita concluded that the planner workaround avoided the crash but addressed the wrong layer: ExecScanFetch should invoke the recheck method only for joins belonging to the EPQ recheck plan, so he supplied an executor fix using epqParam membership that also preserved remote execution for the subquery #12; Sawada confirmed it fixed the problem #13.
- Fujita showed how ordinary BEGIN/COMMIT blocking could reproduce the failure without injection points #14, Paquier verified that approach #15, and Sawada combined it with Fujita's executor fix #16, which Paquier confirmed still exposed the crash when the fix was omitted #17.
- Fujita proposed expanding coverage of postgresRecheckForeignScan #18, but Alvaro Herrera argued that additional tests should not delay a known crash fix #22; Fujita accepted a two-step approach, leaving broader coverage for later work #23.
- Fujita's detailed review led to a clearer test name, a simpler schema, explicit plan inspection, transaction completion, cleanup, and extension-loading options #24 #25, which Sawada incorporated in #26.
- Further review by Paquier and Fujita refined formatting and changed the test to run EXPLAIN VERBOSE separately from SELECT #27 #28; Sawada updated the spec #29, but Fujita caught stale expected output #30, and Paquier supplied the corrected output, alias cleanup, and an ignore entry #31.
- Fujita approved the revised patch and offered to commit it #32, while Sawada explicitly acknowledged Fujita's co-authorship #33; Fujita then posted the final version with an additional ignore entry, editorial cleanup, a rebase, and a complete commit message #37.
- Sawada and Paquier endorsed the final version #38 #39, and Fujita committed its exact diff as 12609fbacb, confirming completion of the announced backpatching through PostgreSQL 13 in #40.
- The thread ended with acknowledgments from Sawada and Paquier #41 #42; the crash fix and its regression test had landed, while the broader postgresRecheckForeignScan coverage remained deferred under the agreed two-step approach #23.