model-writtenrun 731 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Chi Zhang reported a reproducible PostgreSQL 18.4 crash when a generic prepared UPDATE pruned a local partition and modified a foreign partition #1.
- Ayush Tiwari traced the crash to FDW private lists and direct-modification flags retaining their original indexes after result-relation pruning, and proposed rebuilding both alongside the other filtered lists #2; Matheus Alcantara confirmed the fix and requested formatting cleanup #4.
- Rafia Sabih found that EXPLAIN still used the original FDW-list indexes and could crash on non-direct foreign modification, so she supplied a patch on top that saved the filtered list in ModifyTableState and added a reproducer #5.
- Matheus Alcantara combined the executor and EXPLAIN fixes and ran pg_indent #6, then renamed the new field to mt_fdwPrivLists #8 with Ayush's agreement #7.
- Amit Langote considered the fix straightforward but deferred committing until Etsuro Fujita could review it #10 #12, clarifying that the substantive bug was in executor bookkeeping rather than postgres_fdw implementation #13.
- Etsuro Fujita removed a redundant guard, improved comments, moved the regression cases to the writable-foreign-table section, and added plain EXPLAIN coverage for both modification paths while dropping unnecessary ANALYZE execution; he also requested placing the new field last for PostgreSQL 18 ABI compatibility #17.
- Amit incorporated Etsuro's revision and placed mt_fdwPrivLists alongside the other filtered lists at the end of ModifyTableState #18, which Etsuro approved #19.
- The combined crash fix landed unchanged from #18 as 1ef917e3a6, with a PostgreSQL 18 backport, and Amit announced the push #20.
- The PostgreSQL 18 buildfarm ABI check then reported that ModifyTableState had grown by eight bytes; Amit proposed removing the new field on that branch and reconstructing EXPLAIN's mapping from the unchanged plan lists #21.
- Tom Lane found that pg_rewrite creates its own ModifyTableState nodes, establishing a concrete compatibility risk and supporting the no-field solution #22, while Richard Guo considered the EXPLAIN-only lookup overhead acceptable #23.
- Amit posted the REL_18-only ABI repair #25, then incorporated Etsuro's requests to use direct indexing when nothing was pruned and compute that condition outside the loop #26 #27 #28 #29.
- The ABI repair landed unchanged from #29 as bba4e095d2, preserving the executor crash fix while leaving master with the new field; Etsuro subsequently approved the final patch #30, and Amit confirmed the push and a green buildfarm #31 #32.
- With both fixes landed, the reporter later asked whether the crash qualified for a CVE #33; Amit replied that he considered it excluded by PostgreSQL's policy for authenticated users causing denial of service through valid SQL, leaving no patch work outstanding in the thread #34.