Hello,
I am unable to use psql's \COPY command to load in large text files on Windows. Here are the steps I used to reproduce:
1. Install PostgreSQL 11.0 from enterprisedb
2. Create two files: test1.txt (2.4 GB) and test2.txt (1.8 GB) - content doesn't matter
3. Run SQL Shell (psql)
postgres=# create table tbl (col int);
CREATE TABLE
postgres=# \COPY tbl FROM 'test1.txt'
could not stat file "test1.txt": Unknown error
postgres=# \COPY tbl from 'test2.txt'
(runs normally)
I believe the issue is related to `stat` not handling large files properly. I installed PostgreSQL 10.5 Windows x86-64 from the EDB website, attempted to reproduce, and *could not* reproduce the error, so I think this is a PostgreSQL 11 specific bug.
-Alistair