Re: Safeguards against incorrect fd flags for fsync()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Michael Banck <mbanck(at)gmx(dot)net>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Safeguards against incorrect fd flags for fsync()
Date: 2025-06-11 01:09:35
Message-ID: 947174.1749604175@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)xyz> writes:
> We don't have a trace of O_ACCMODE in the tree, and POSIX defines it.
> I'm wondering how the buildfarm would react on that, but perhaps
> that's fine on !WIN32. It's hard to say with all the hosts there, at
> least the CI is OK.

POSIX has required O_ACCMODE in fcntl.h at least since 2008,
if I'm reading things correctly. So it's probably safe to
depend on this symbol. Still, I'd like to be closer to having
a working Hurd buildfarm member before we take a portability
risk that would only benefit Hurd.

> Another thing that may be worth considering is if we should remove
> this sanity check.

Nah.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Naga Appani 2025-06-11 01:22:36 Re: [PATCH v1] Add pg_stat_multixact view for multixact membership usage monitoring
Previous Message Michael Paquier 2025-06-11 00:32:27 Re: queryId constant squashing does not support prepared statements