Re: Unable to copy large (>2GB) files using PostgreSQL 11 (Windows)

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Alistair Johnson <alistair(dot)e(dot)w(dot)j(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Unable to copy large (>2GB) files using PostgreSQL 11 (Windows)
Date: 2018-11-02 23:35:12
Message-ID: 20181102233512.GD1899@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Nov 02, 2018 at 02:46:44PM -0400, Alistair Johnson wrote:
> 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.

You would be interested in this thread then:
https://www.postgresql.org/message-id/1803D792815FC24D871C00D17AE95905CF5099@g01jpexmbkw24

Windows portability problems with stat() makes this problem way harder
than it looks at first glance, because it also uses a "stat" structure
which is not able to store the size of files larger than 2GB. I tried a
couple of solutions for that, but gave up because of how things got
easily dirty. I don't think that we want to replace the "stat"
structure used all over the code for a "pg_stat" equivalent either, many
folks rely on the system definitions for many patches, so that would be
most likely forgotten and lead to extra bugs on Windows :(

If somebody is smart enough to design a patch for that one, please feel
free to send one..
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message tianhe zh 2018-11-03 02:04:31 关于 sqlda.pgc 中 numeric 数据类型精度丢失问题报告
Previous Message Alvaro Herrera 2018-11-02 22:59:55 Re: Ris: BUG #15482: Foreign keys to a partition (NOT A PARTITIONED) break the server