Обсуждение: Was there a bug fix in the COPY command in Version 15?
Hello. I had the symptoms when I tried to import a file larger than 2GB with the COPY command. # copy A_TABLE from 'C:/A_TABLE.dat' with BINARY; could not stat file "A_TABLE.dat": Unknown error Up until PostgreSQL Version 11..14 it was failing in the same way. But, Up to Version 10, a 2GB file created with `COPY TO` could be copied with `COPY TO`. However, in Version 15, I recreated the instance and ran the COPY command, and it worked. The command is simple. > `COPY A_TABLE FROM 'C:/A_TABLE.dat' with BINARY;` I'm using the Windows version of EDB Binaries. Did something change in PostgreSQL 15?
On Wed, Feb 01, 2023 at 01:44:30PM +0900, h-shibata@nssys.co.jp wrote: > I'm using the Windows version of EDB Binaries. > Did something change in PostgreSQL 15? All that has been mainly influenced by bed907, available since v14, so the failure with COPY for files larger than 4GB (not 2GB) should not be seen for 14 and newer versions. See for example this thread that shows the same report: https://www.postgresql.org/message-id/15858-9572469fd3b73263%40postgresql.org -- Michael
Вложения
> All that has been mainly influenced by bed907, available since v14, so > the failure with COPY for files larger than 4GB (not 2GB) should not > be seen for 14 and newer versions. > > See for example this thread that shows the same report: > https://www.postgresql.org/message-id/15858-9572469fd3b73263%40postgresql.org I was mistaken. I have confirmed that COPY over 2GB succeeds even with version 14 ( latest). It seems that the argument type specified in the fstat function has been redefined from 32 bits to 64 bits and resolved. Thank you for your comment.