model-writtenrun 9808 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Luis Carril reported that creating a foreign table and copying into it in the same transaction failed with a missing-file error, tracing the failure to heap_sync in CopyFrom #1.
- Amit Langote reproduced the failure and explained that foreign tables have no physical files, proposing that CopyFrom exclude them from heap-specific optimizations; Luis implemented that guard in the first patch #2 #3.
- Testing required wal_level=minimal: Amit proposed a SQL regression test run through installcheck, while Michael Paquier initially suggested TAP coverage, which Luis added in his next submission #4 #5 #10.
- Etsuro Fujita suggested skipping heap_sync instead, but Amit and Michael settled on fixing the caller and keeping heap_sync a low-level routine, leaving broader relation-persistence semantics outside this bug fix #9 #11 #12 #15.
- After Amit reviewed the TAP test and indentation, Michael took over the patch, judged TAP excessive for this case, and replaced it with a postgres_fdw SQL regression test plus an explanatory comment #13 #16.
- Amit questioned allowing COPY FREEZE on foreign tables when FDWs never receive that option, but Michael raised compatibility concerns and left that separate interface question unchanged #17 #18.
- Etsuro demonstrated the same missing-file failure for views with INSTEAD OF INSERT triggers and requested regression coverage, expanding the fix beyond foreign tables #22 #25.
- Michael's final patch used RELKIND_CAN_HAVE_STORAGE on HEAD and added the view regression test, with explicit relation-kind checks planned for older branches because view support began in PostgreSQL 10 and foreign-table support in PostgreSQL 11 #26 #29.
- Etsuro reviewed the final patch and preferred identical explicit checks across branches to simplify backpatching, but accepted Michael's argument that the storage-capability macro would protect HEAD against future relation kinds #30 #31 #32 #33.
- Michael committed the complete final patch with only a comment clarification as bf491a9073, and its view-only PostgreSQL 10 adaptation as 15f69279e0, announcing completion through PostgreSQL 10 #34.
- Michael then configured his dangomushi buildfarm animal to run regression tests with wal_level=minimal so the new cases would exercise the failure condition; the thread ended with acknowledgments from Amit and Etsuro and no outstanding part of this fix #35 #36 #37.