pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: sandy kumar <sandeep.t.kumar@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #15654: COPY command not working for 2gb CSV files
Date: Tue, 26 Feb 2019 09:09:53 +0900
Message-ID: <20190226000953.GA27822@paquier.xyz> (raw)
In-Reply-To: <CAKJS1f-o955h5nrtE6R_ftXFomuQAw6y3XGxki73GLxCxTtODg@mail.gmail.com>
References: <15654-bd233aae1c150270@postgresql.org>
	<CAKJS1f_qgyV4C_3g66ii2mVS7sjx05-PPXekyEE5iXJbsGHC7w@mail.gmail.com>
	<20190225234352.GH30864@paquier.xyz>
	<CAKJS1f-o955h5nrtE6R_ftXFomuQAw6y3XGxki73GLxCxTtODg@mail.gmail.com>

On Tue, Feb 26, 2019 at 12:52:58PM +1300, David Rowley wrote:
> hmm, but we're talking about fstat() not stat().  Perhaps it suffers
> from the same issue, but there does not appear to be a macro for
> fstat() in win32_port.h therefore likely involves a less complex fix.

I thought that was the case, and double-checking pgwin32_safestat()
only maps to stat().

Windows has the bad idea to declare _stat, and put the rest of the
return results of the different calls of stat() and fstat() into
different structures.

Anyway, if I recall correctly, you are still going to run into issues
if trying to map _stat64 to "struct stat".  I have played with this
problem for a couple of hours, and this did not finish well because of
the define of stat to pgwin32_safestat in port.h.  And we likely don't
want to have a dedicated pg_stat struct in the full code tree as
that's spread to a lot of places.
--
Michael

Attachments:

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

view thread (7+ messages)  latest in thread

Message-ID: <20190226000953.GA27822@paquier.xyz>
Permalink:  ../20190226000953.GA27822@paquier.xyz/
Also on:    postgresql.org/message-id/20190226000953.GA27822@paquier.xyz

 · 

reply

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: michael@paquier.xyz, david.rowley@2ndquadrant.com, sandeep.t.kumar@gmail.com
  Subject: Re: BUG #15654: COPY command not working for 2gb CSV files
  In-Reply-To: <20190226000953.GA27822@paquier.xyz>
  References: <15654-bd233aae1c150270@postgresql.org> <CAKJS1f_qgyV4C_3g66ii2mVS7sjx05-PPXekyEE5iXJbsGHC7w@mail.gmail.com> <20190225234352.GH30864@paquier.xyz> <CAKJS1f-o955h5nrtE6R_ftXFomuQAw6y3XGxki73GLxCxTtODg@mail.gmail.com> <20190226000953.GA27822@paquier.xyz>

* 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