Re: Error in COPY command with files over 1GB

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Error in COPY command with files over 1GB
Дата
Msg-id 20190809022405.GD3194@paquier.xyz
обсуждение исходный текст
Ответ на Error in COPY command with files over 1GB  (Andrew Zimmerman <andrew@abcsoftek.com>)
Ответы Re: Error in COPY command with files over 1GB  (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>)
Список pgsql-bugs
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

Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: BUG #15943: Valgrind-detected error in SlruPhysicalWritePage
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #15940: json_populate_recordset fails with ERROR: recordtype has not been registered