model-writtenrun 9164 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- yi huang reported a PostgreSQL 12 crash under concurrent pgbench execution in #1; Tom Lane reproduced it in EvalPlanQual in #2 and traced it to using the output tuple descriptor for a VALUES scan's substitution slot in #3.
- Andres Freund identified ROW_MARK_COPY as the problematic case and considered fetching rowmarks on demand in #4, then posted a smaller workaround storing copied rows as Datums in #6, reporting that it fixed the crash and passed existing tests.
- Tom Lane considered the workaround viable for late PostgreSQL 12 beta but requested a prototype of the cleaner EPQState-based design in #7; Andres's alternative of preserving row-type information in #8 drew concerns about typcache overhead and invasiveness from Tom in #9.
- After questioning nested EPQ slot sharing in #10, Andres posted the redesign in #11: scan nodes fetch non-locking rowmarks on demand, EPQState owns substitution state, and slots can be allocated before expensive EPQ startup; he reported passing tests but identified substantial coverage gaps.
- Tom's detailed review in #12 accepted dropping nested slot sharing and requested clearer executor-state documentation, better names, deferred bookkeeping allocation and several corrections; Andres agreed and explained why the early EvalPlanQualBegin call could be removed in #13.
- Andres incorporated that review and added ROW_MARK_COPY and nested-EPQ isolation coverage in #14, while leaving broader coverage and execution optimizations for later because index-only mark/restore appeared unreachable; #15 immediately removed an accidental debugging line from expected output.
- Andres committed #15 as 27cc7cd2bc, adding explicit state initialization and further polishing while dropping the temporary test-schedule changes, and announced the push and PostgreSQL 12 backpatch in #16.
- With the fix landed, Andres noted that PostgreSQL 12 needed WARNING messages for the new tests and raised a possible isolation-tester backpatch in #16; Tom opposed replacing apparently unreachable index-only EPQ paths with unconditional errors in #17, because distant future changes could make those paths reachable.