Re: Safeguards against incorrect fd flags for fsync()
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Michael Banck <mbanck@gmx.net>,
Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-06-11T01:09:35Z
Lists: pgsql-hackers
Michael Paquier <michael@paquier.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
Commits
-
Make safeguard against incorrect flags for fsync more portable.
- d0a695cf41de 13.22 landed
- 71d71ac4d1bb 14.19 landed
- 0fb496c704fc 15.14 landed
- 45c5276628d1 18.0 landed
- 3a2617e4f0be 16.10 landed
- 29c54ea7b49c 17.6 landed
- 29213636e6cd 19 (unreleased) landed
-
Add safeguards for pg_fsync() called with incorrectly-opened fds
- 12198239c0a5 13.0 landed