From: Michael Paquier <michael@paquier.xyz>
To: Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: williamedwinallen@live.com, pgsql-bugs@lists.postgresql.org, Magnus Hagander <magnus@hagander.net>
Subject: Re: BUG #15858: could not stat file - over 4GB
Date: Wed, 26 Jun 2019 11:22:36 +0900
Message-ID: <20190626022236.GE1714@paquier.xyz> (raw)
In-Reply-To: <CAC+AXB2Fu5oJm7pmS1Pg3Gf_XyxSfun1DA7dPf+yZFQ3p5vV3g@mail.gmail.com>
References: <15858-9572469fd3b73263@postgresql.org>
<20190619012604.GC2135@paquier.xyz>
<CAC+AXB0j9pN4z5XxMbn6+kcE_QM+CErjfYp-vVz2rU4suU7u=g@mail.gmail.com>
<16138.1560966010@sss.pgh.pa.us>
<17044.1560967356@sss.pgh.pa.us>
<CAC+AXB2Fu5oJm7pmS1Pg3Gf_XyxSfun1DA7dPf+yZFQ3p5vV3g@mail.gmail.com>
On Tue, Jun 25, 2019 at 12:00:45PM +0200, Juan José Santamaría Flecha wrote:
> I will not have much time for this list in the next couple of weeks,
> so I will send this patch in its current WIP state rather than
> stalling without a reply.
>
> Most of its functionality comes from Sergey's patch with some cosmetic
> changes, and the addition of the 64 bits struct stat and fstat().
The former patch was rather impressive. Or scary. Or both. At which
extent have you tested it? I think that we really need to make sure
of a couple of things which satisfy our needs:
1) Are we able to fix the issues with stat() calls on files larger
than 2GB and report a correct size?
2) Are we able to detect properly that files pending for deletion are
discarded with ENOENT?
3) Are frontends able to use the new layer?
It seems to me that you don't need the configure changes.
Instead of stat_pg_fixed which is confusing because it only involves
Windows, I would rename the new file to stat.c or win32_stat.c. The
location in src/port/ is adapted. I would also move out of
win32_port.h the various inline declarations and keep only raw
declarations. That could be much cleaner.
The code desperately needs more comments to help understand its
logic. Don't we have in the tree an equivalent of cvt_ft2ut? What
does cvt_attr2uxmode do? It would be nice to avoid conversion
wrappers as much as possible, and find out system-related equivalents
if any, and actually if necessary.
+static unsigned short
+cvt_attr2uxmode(int attr, const _TCHAR * name)
This looks rather bug-prone...
I think that this stuff has not been tested and would break at
compilation. If src/tools/msvc/Mkvcbuild.pm is not changed, then the
new file won't get included in the compiled set.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../20190626022236.GE1714@paquier.xyz/2-signature.asc)
download
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: michael@paquier.xyz, juanjo.santamaria@gmail.com, tgl@sss.pgh.pa.us, magnus@hagander.net
Subject: Re: BUG #15858: could not stat file - over 4GB
In-Reply-To: <20190626022236.GE1714@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