Re: Windows now has fdatasync()

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Windows now has fdatasync()
Date: 2022-07-19 05:45:15
Message-ID: CA+hUKGKr8PjdjGibGEVHCkQwokYFV4sie-JHbCBq1zb1mdf+XA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 19, 2022 at 4:54 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> Do you still need HAVE_DECL_FDATASYNC?

I guess so, because that is currently used for macOS, and with this
patch would also be used to control the declaration for Windows. The
alternative would be to explicitly test for WIN32 or __darwin__.

The reason we need it for macOS is that they have had fdatasync
function for many years now, and configure detects it, but they
haven't ever declared it in a header, so we (accidentally?) do it in
c.h. We didn't set that up for Apple! The commit that added it was
33cc5d8a, which was about a month before Apple shipped the first
version of OS X (and long before they defined the function). So there
must have been another Unix with that problem, lost in the mists of
time.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Steve Chavez 2022-07-19 05:55:14 Re: Allow placeholders in ALTER ROLE w/o superuser
Previous Message Michael Paquier 2022-07-19 05:36:25 Re: Making pg_rewind faster