model-writtenrun 4660 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Daniel Watzinger reported that Windows seek calls incorrectly succeed on terminals and pipes, breaking custom-format dump and restore operations, and proposed both seekability checks and improved fstat() reporting in #1; after Daniel Gustafsson identified a corrupted attachment in #2, Daniel resent it in #3.
- Michael Paquier recommended fixing fstat() independently, questioned platform-wide seekability checks, requested explanations and safer handling of unusual Windows file types, and raised automated-test coverage concerns in #4.
- Juan José Santamaría Flecha reproduced the pipe failure and supported rejecting unknown file types in #5, then supplied two independent patches in #6, using a Windows-specific GetFileType() check for seekability and revising Daniel’s fstat() implementation.
- Michael accepted the fstat() portion but favored centralized Windows seek wrappers over a checkSeek()-only workaround in #7; Juan agreed in #8, and Michael recommended a separate discussion for that broader fix in #9.
- Daniel endorsed the revised fstat() fix and the wrapper approach, while explaining how Windows process and pipe APIs could reproduce the problem programmatically, in #10; Juan announced a seek-wrapper patch in a separate thread in #11.
- Michael committed the fstat() portion of #6 with light editorial changes as 765f5df726 and confirmed backpatching through PostgreSQL 14 in #12; the complete dump/restore fix still required the separate fseek()/ftello() work.