model-writtenrun 4878 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Amit Langote proposed batching the inserts performed when an UPDATE moves rows from local partitions into foreign partitions, initially changing both postgres_fdw state selection and executor flushing while exposing PartitionTupleRouting #1.
- Georgios Kokolatos questioned exposing the whole routing structure and tested the feature; Amit retained that approach provisionally and clarified that remote-to-remote movement was outside scope and the destination foreign partition must be excluded from UPDATE targets #3 #6 #7 #9.
- Georgios requested a regression test that could distinguish batched from individual remote inserts and suggested inspecting cmin; Amit added that test, and Georgios judged the patch ready while retaining his preference for accessors #10 #11 #12.
- After an April rebase, Zhihong Yu's review led to an additional assertion, while Amit repaired the tests for newer foreign-partition restrictions and expanded coverage to batching enabled and disabled #15 #16 #17.
- Bharath Rupireddy questioned test ordering and the stability of cmin values, prompting Amit to replace cmin checks with remote statement-trigger logging; Bharath accepted the revised tests #18 #19 #20.
- Zhijie Hou found that delayed tuple-routing initialization made the cached routing pointer stale and caused regression failures; Amit fixed the pointer lookup, adjusted assertions and NULL checks, and rebased the patch #22 #23.
- Following another rebase, vignesh C reported a postgres_fdw test failure, which Amit traced to an underlying batching bug and addressed by adding a prerequisite patch that uses the correct tuple descriptor for buffered plan slots #25 #26 #27.
- Amit reported that Tomas had committed the prerequisite bug fix and resent only the batching feature; after several months, he refreshed it again to resolve a nodeModifyTable.c conflict #28 #30.
- In December 2022, Etsuro Fujita observed that upstream pending-insert handling had eliminated the need for the custom flushing code and exposed routing structure, and that existing UPDATE restrictions made auxiliary-state selection unnecessary #31.
- Amit substantially simplified the patch accordingly, restoring the auxiliary-state assertion and documenting that batching applies only when the destination foreign partition is not also an UPDATE target; Etsuro considered this version committable #32 #33.
- Etsuro supplied a final revision that removed leftover remote test tables and the trigger function, separated cleanup sections, and corrected test wording; Amit approved those changes #34 #35.
- Etsuro committed the final posted diff unchanged apart from rebase metadata as 594f8d3776 and announced the push; the thread ended with Amit's thanks and no remaining patch awaiting review #34 #36 #37.