pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #15975: Copy from large text files on Windows returns "unknown error" 2+ messages / 2 participants [nested] [flat]
* BUG #15975: Copy from large text files on Windows returns "unknown error" @ 2019-08-23 21:11 PG Bug reporting form <noreply@postgresql.org> 2019-08-23 21:53 ` Re: BUG #15975: Copy from large text files on Windows returns "unknown error" Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 2+ messages in thread From: PG Bug reporting form @ 2019-08-23 21:11 UTC (permalink / raw) To: pgsql-bugs@lists.postgresql.org; +Cc: johann@myrkraverk.com 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #15975: Copy from large text files on Windows returns "unknown error" 2019-08-23 21:11 BUG #15975: Copy from large text files on Windows returns "unknown error" PG Bug reporting form <noreply@postgresql.org> @ 2019-08-23 21:53 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2019-08-23 21:53 UTC (permalink / raw) To: johann@myrkraverk.com; +Cc: pgsql-bugs@lists.postgresql.org PG Bug reporting form <noreply@postgresql.org> writes: > It turns out that trying to COPY FROM a large textfile, say several > gigabytes, will always fail. This is being worked on. If you're in a position to review or test the patch being discussed here: https://commitfest.postgresql.org/24/2189/ please do. > According to Stack Overflow, this only happens > on PostgreSQL 11. Seems unlikely. There's never been support in PG for working around Windows' weirdness in this area (ie lack of stat() support for the case). regards, tom lane ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-08-23 21:53 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-08-23 21:11 BUG #15975: Copy from large text files on Windows returns "unknown error" PG Bug reporting form <noreply@postgresql.org> 2019-08-23 21:53 ` Tom Lane <tgl@sss.pgh.pa.us>
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