pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Error in COPY command with files over 1GB
3+ messages / 3 participants
[nested] [flat]

* Error in COPY command with files over 1GB
@ 2019-08-08 16:30 Andrew Zimmerman <andrew@abcsoftek.com>
  2019-08-09 02:24 ` Re: Error in COPY command with files over 1GB Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 3+ messages in thread

From: Andrew Zimmerman @ 2019-08-08 16:30 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

I am getting the following error when importing from a tab-delimited text file longer than 1 GB.
ERROR: could not stat file "C:\ABC Software\Database Export\Data\invoice_detail.data": Unknown error
Splitting the tab-delimited file into multiple files less than 1 GB and COPY'ing them individually works correctly.
I tested on both versions 11.2 and 11.4 on Windows with the same result.

Andrew Zimmerman
ABC Softek LLC
andrew@abcsoftek.com<mailto:andrew@abcsoftek.com>
www.SimplifyMyBiz.com<http://www.simplifymybiz.com/;

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Error in COPY command with files over 1GB
  2019-08-08 16:30 Error in COPY command with files over 1GB Andrew Zimmerman <andrew@abcsoftek.com>
@ 2019-08-09 02:24 ` Michael Paquier <michael@paquier.xyz>
  2019-08-09 07:20   ` Re: Error in COPY command with files over 1GB Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Michael Paquier @ 2019-08-09 02:24 UTC (permalink / raw)
  To: Andrew Zimmerman <andrew@abcsoftek.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

On Thu, Aug 08, 2019 at 04:30:00PM +0000, Andrew Zimmerman wrote:
> I am getting the following error when importing from a tab-delimited text file longer than 1 GB.
> ERROR: could not stat file "C:\ABC Software\Database Export\Data\invoice_detail.data": Unknown error
> Splitting the tab-delimited file into multiple files less than 1 GB and COPY'ing them individually works correctly.
> I tested on both versions 11.2 and 11.4 on Windows with the same result.

This relates to the fact that Windows does not offer an easy way to
stat() correctly files which are more than 2GB, as the struct stat is
built with a 4-byte size field.

There has been some work on that lately (quoting Tom from a recent
mail):
https://www.postgresql.org/message-id/flat/1803D792815FC24D871C00D17AE95905CF5099%40g01jpexmbkw24

However there is no way that a complex patch would get back-patched,
and that's what we were heading to in the latest discussions I recall
on the matter.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Error in COPY command with files over 1GB
  2019-08-08 16:30 Error in COPY command with files over 1GB Andrew Zimmerman <andrew@abcsoftek.com>
  2019-08-09 02:24 ` Re: Error in COPY command with files over 1GB Michael Paquier <michael@paquier.xyz>
@ 2019-08-09 07:20   ` Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Juan José Santamaría Flecha @ 2019-08-09 07:20 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Andrew Zimmerman <andrew@abcsoftek.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

On Fri, Aug 9, 2019 at 4:24 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> There has been some work on that lately (quoting Tom from a recent
> mail):
> https://www.postgresql.org/message-id/flat/1803D792815FC24D871C00D17AE95905CF5099%40g01jpexmbkw24
>

There is currently an open item in the commitfest:

https://commitfest.postgresql.org/24/2189/


Regards,

Juan José Santamaría Flecha





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2019-08-09 07:20 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-08-08 16:30 Error in COPY command with files over 1GB Andrew Zimmerman <andrew@abcsoftek.com>
2019-08-09 02:24 ` Michael Paquier <michael@paquier.xyz>
2019-08-09 07:20   ` Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>

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