From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: johann@myrkraverk.com
Subject: BUG #15975: Copy from large text files on Windows returns "unknown error"
Date: Fri, 23 Aug 2019 21:11:38 +0000
Message-ID: <15975-80e6438a9a73f74f@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15975
Logged by: Johann Oskarsson
Email address: johann@myrkraverk.com
PostgreSQL version: 11.5
Operating system: Windows 10
Description:
When I try to load a large text file into PostgreSQL 11 on Windows, I get an
"unknown error." This has been discussed on StackOverflow here:
https://stackoverflow.com/q/53523051/264751
It turns out that trying to COPY FROM a large textfile, say several
gigabytes, will always fail. According to Stack Overflow, this only happens
on PostgreSQL 11. The earlier releases don't seem to have this problem.
Example, given
create table pwned( passwd sha1 not null, count int4 not null );
Then
copy pwned( passwd, count ) from
'c:\src\postgres\pwned\pwned-passwords-sha1-ordered-by-hash-v5.txt' with (
format text, delimiter ':' );
gives
ERROR: could not stat file
"c:\src\postgres\pwned\pwned-passwords-sha1-ordered-by-hash-v5.txt": Unknown
error
Workaround is to pipe the file through a program, as discussed here:
https://wp.me/p4w9PF-di
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, johann@myrkraverk.com
Subject: Re: BUG #15975: Copy from large text files on Windows returns "unknown error"
In-Reply-To: <15975-80e6438a9a73f74f@postgresql.org>
References: <15975-80e6438a9a73f74f@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox