model-writtenrun 8072 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- William Allen reported that COPY failed on files larger than 4GB on Windows Server 2012 R2 in #1, and Michael Paquier connected the problem to earlier Windows stat compatibility work in #2.
- Juan José SantamarÃa Flecha proposed a 64-bit struct stat and native-function wrappers in #3; Tom Lane recommended macro-based suppression of the native declarations and a separate implementation file in #4.
- After investigating stale metadata returned by Microsoft's stat implementation, Tom recommended rebuilding stat on Windows APIs in #5, leading Juan to submit a GetFileAttributesEx implementation based on Sergey's earlier work in #6.
- Michael's review in #7 identified missing MSVC build integration, excessive inline wrappers, and unclear conversion code; Juan addressed these in #8 and reported successful large-file COPY testing.
- Tom requested proper configure.in integration and initialization of every stat field in #11; Juan's rework in #12 also switched to GetFileInformationByHandle to handle symbolic links and delete-pending files more reliably.
- Emil Iggland tested the handle-based implementation with PostgreSQL 11.6 and confirmed that patched psql could import the problematic file in #15.
- Juan refreshed the patch in #16, renaming win32stat.c and revising compatibility and error handling; subsequent revisions #18 and #19 repaired MSVC 2013 compilation after compatibility declarations had been removed.
- Following a several-month gap, Juan rebased the patch in #22, and Tom's review in #23 raised the remaining question of whether Windows lstat should differ from stat.
- Juan considered a lightweight lstat implementation in #26 but rejected that approach because of delete-pending behavior in #27, retaining the existing stat/lstat equivalence.
- Emil tested large and small imports, reviewed the Windows API usage, and proposed more accurate GetFileAttributes error mapping in #28; Tom incorporated that suggestion and editorial changes when committing #22 as bed90759fc, announcing it in #29.
- Juan submitted an additional error-preservation and formatting patch in #30; Michael rejected its bypass of _dosmaperr in #31, and Tom committed the remaining changes as c94cfb38c3, explaining the omission in #33.
- The cleanup introduced a misspelled nFileSizeLow member, which Tom corrected in 961e07b8cc; when Michael later reported the buildfarm failure in #35, Tom explained that the correction had already landed in #36.
- Michael identified another incorrect ENOENT assignment after CreateFile failure in #37; Juan agreed in #39, and Tom committed accurate Windows error mapping as fcd11329db, confirming it in #40.
- Shenhao Wang requested backpatches after observing the problem in PostgreSQL 12.6 and 13.2 in #42; Michael advised waiting for PostgreSQL 14 release feedback because the change was invasive in #44, and Shenhao acknowledged that position in the final message #45.