model-writtenrun 7512 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Feb - Apr 2021 · 21 entries
- Kazutaka Onishi revived KaiGai Kohei's earlier work from thread #41753, proposing an ExecForeignTruncate callback and postgres_fdw support with a separate truncatable option in #1.
- Zhihong Yu identified missing loop exits and a misleading function-name comment in #2, which Onishi corrected in #3.
- Ashutosh Bapat questioned the option's semantics and the need to truncate through a foreign table in #4; Onishi explained centralized access and non-SQL data sources in #9, while KaiGai emphasized TRUNCATE's distinct permissions and locking in #10.
- After a month, Ibrar Ahmed rebased the patch in #12; Amit Langote then found a logical-replication partition test failure in #13, and Onishi added the missing relation-context entry in #15.
- Fujii Masao's review in #16 exposed incomplete documentation, questionable foreign-table WAL logging and questions about remote permission checks; Onishi expanded the documentation in #17, accidentally including a backup source file that KaiGai identified in #18.
- Fujii and Michael Paquier argued that foreign-table TRUNCATE should follow other foreign DML and avoid core WAL generation in #20 and #21, and KaiGai accepted that direction in #25.
- Fujii demonstrated order-sensitive behavior when the same foreign table was discovered through different paths in #24, and KaiGai proposed named context flags in #26; Onishi introduced those flags and foreign-table WAL exclusions in #32.
- Remote permission checks remained part of actual FDW execution: Fujii accepted that local-first truncation caused no demonstrated correctness bug in #29, and his later revision clarified that behavior in the code comments in #62.
- Bharath Rupireddy and Zhihong Yu reviewed test stability, naming, cleanup and hash-table handling in #34, #35 and #36; Onishi incorporated their feedback and repaired accidental unrelated branch changes through #44.
- Further review by Bharath in #45, #49 and #51 led to protected hash cleanup, delayed connection acquisition, simpler regression tests, separate truncatability documentation and reuse of do_sql_command(), incorporated through #55.
- Before the first landing, KaiGai argued that forwarding ONLY could leave rows visible through a supposedly truncated foreign table in #57 and demonstrated the inconsistency in #59; Fujii retained the metadata temporarily so the feature could land while that design discussion continued in #62.
- Fujii polished and rebased the feature, then committed 8ff1c94649 exactly as recorded in #65, leaving ONLY propagation, context metadata and missing tab completion as follow-up items.
- Fujii supplied the independent tab-completion patch in #70, Bharath tested it in #72, and it landed unchanged as 81e094bdfd, announced in #78.
- Justin Pryzby supplied documentation corrections and two code cleanups in #75, including a bug where consecutive context integers were tested as bit flags; after review, #79 replaced the equality fix with a single ONLY bit and dropped the proposed switch conversion.
- KaiGai argued that ONLY should select local relations without selecting only part of their external data in #83 and demonstrated inconsistency with SELECT in #87; Kyotaro Horiguchi supported local-only interpretation in #86, and Fujii accepted consistency with existing foreign-table commands as the immediate rule in #90.
- The discussion distinguished ONLY from CASCADE/RESTRICT and sequence handling, with KaiGai explaining their different roles in #92 and Kyotaro questioning broader option propagation in #93; Fujii deferred broader behavioral changes while proposing removal of ONLY metadata in #97.
- Kyotaro reviewed that removal and supplied a test fix in #98 so the child table actually contained rows before truncation; Fujii incorporated it and revived Justin's documentation work as a companion patch in #101.
- Bharath, Justin and Zhihong refined the callback descriptions, identity defaults and explanations of local versus remote ONLY behavior in #102, #104, #105 and #108, leading to the final two-patch submission in #113.
- Fujii committed the ONLY-removal component of #113 unchanged as 8e9ea08bae, announced in #115; removing the metadata also superseded Justin's earlier context-bit repair.
- The companion documentation component of #113 landed as 0c8f40863a with only the phrase “for instance” restored, and Fujii announced completion in #117.
- By #117, the feature, tab completion and both final follow-ups had landed without a revert; ONLY was no longer forwarded, while broader CASCADE/RESTRICT behavior remained a possible future topic as discussed in #95.