Unable to copy large (>2GB) files using PostgreSQL 11 (Windows) - Mailing list pgsql-bugs

From Alistair Johnson
Subject Unable to copy large (>2GB) files using PostgreSQL 11 (Windows)
Date
Msg-id CAKHmqNCfTMM6=Pqc6RUMEQ_2BPfo5KGGG-0fzRXZCVooo=wdNA@mail.gmail.com
Whole thread Raw
Responses Re: Unable to copy large (>2GB) files using PostgreSQL 11 (Windows)  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: pgstattuple does not work with uppercase table names
Next
From: Thomas Munro
Date:
Subject: Re: BUG #15475: Views over CITEXT columns return no data