Hi, This mail is about following bug report post: https://www.postgresql.org/message-id/flat/153442391458.1505.9181095584291689853%40wrigleys.postgresql.org
When pg_dump has '--format=directory' option and the dump file size become 4GB over, the strange error message 'Unknown error' will be output. This is because _stat64i32() is used for stat() on Windows, I think. Seeing following URL, _stat64i32() could use 32 bit, it means 4GB is max size. https://msdn.microsoft.com/en-us/library/14h5k7ff.aspx When I create the simple application to use stat() on VS2013, stat() could not deal with 4GB file and failed with errno=132. I think the pg_dump occurs EOVERFLOW, but Windows' errno.h does not have this errno, so 'Unknown error' is output. So, pgwin32_safestat() should be changed to solve this problem. Do you have any idea or comments? Regards, Daisuke Higuchi