model-writtenrun 8943 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that inserting into a postgres_fdw table with two AFTER INSERT triggers caused an assertion failure in PostgreSQL 12.1 #1; Etsuro Fujita reproduced it and traced the regression to the earlier trigger changes #2 #3.
- Etsuro Fujita found that AfterTriggerExecute() cleared tuple slots needed by subsequent foreign-table triggers, and posted a fix preserving those slots with an INSERT regression test #4.
- Fujita expanded the patch to leave tg_newslot NULL for INSERT/DELETE, document the slot-based TriggerData interface, and test UPDATE and DELETE as well #5.
- Fujita then discovered that switching from foreign-table triggers to regular-table triggers could leave foreign scratch slots populated, so he revised afterTriggerInvokeEvents() to drop and null them when switching relations #6.
- The final patch landed as 5a20b0219e with an unchanged code, test, and documentation diff from #6, a revised commit message, and a backport to PostgreSQL 12; Fujita confirmed the push and thanked Lakhin, closing the thread without outstanding work #7.