stat() on Windows might cause error if target file is larger than4GB

Поиск
Список
Период
Сортировка
От Higuchi, Daisuke
Тема stat() on Windows might cause error if target file is larger than4GB
Дата
Msg-id 1803D792815FC24D871C00D17AE95905CF5099@g01jpexmbkw24
обсуждение исходный текст
Ответы Re: stat() on Windows might cause error if target file is largerthan 4GB  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
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




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Hironobu SUZUKI
Дата:
Сообщение: Re: pgbench - add pseudo-random permutation function
Следующее
От: Tom Lane
Дата:
Сообщение: SerializeParamList vs machines with strict alignment