Hi all,
After the set of issues discussed here, it seems to me that it would
be a good thing to have some safeguards against incorrect flags when
opening a fd which would be used for fsync():
https://www.postgresql.org/message-id/16039-196fc97cc05e141c@postgresql.org
Attached is a patch aimed at doing that. Historically O_RDONLY is 0,
so when looking at a directory we just need to make sure that no write
flags are used. For files, that's the contrary, a write flag has to
be used.
Thoughts or better ideas?
Thanks,
--
Michael