Re: stat() on Windows might cause error if target file is larger than 4GB

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Higuchi, Daisuke" <higuchi(dot)daisuke(at)jp(dot)fujitsu(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: stat() on Windows might cause error if target file is larger than 4GB
Date: 2018-09-14 18:57:47
Message-ID: CA+TgmobiL+7-EqdQ54jSNjj2WXA6+MfvNiWFZb6RLHnKCJv9sw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 13, 2018 at 10:05 PM, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> On Thu, Sep 13, 2018 at 02:23:47PM -0400, Robert Haas wrote:
>> This, to me, seems way too clever. Replacing 'struct stat' with
>> something else everywhere in the code is more churn, but far less
>> likely to have surprising consequences down the road. Or so I would
>> think, anyway.
>
> I don't have the mind set to work on that today (enough Windows-ism for
> the day), but I would rather use the clever solution because, as far as
> I know, we want a back-patchable solution so things should not be
> invasive.

I do not think that using #define to play clever tricks like this can
reasonably be classified as non-invasive. Non-invasive doesn't mean
it touches a small number of lines; it means it's unlikely to break
stuff. Otherwise,

#define continue break

would qualify as non-invasive.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeremy Finzel 2018-09-14 18:58:58 Delta Materialized View Refreshes?
Previous Message Nikolay Shaplov 2018-09-14 18:30:25 Re: [PATCH] get rid of StdRdOptions, use individual binary reloptions representation for each relation kind instead