Hi,
On 2019-02-17 23:29:09 +1300, Thomas Munro wrote:
> Hmm. Well, at least ENOSPC should be treated the same way as EIO.
> Here's an experiment that seems to confirm some speculations about NFS
> on Linux from the earlier threads:
I wish we'd' a good way to have test scripts in the tree for something
like that, but using postgres. Unfortunately it's not easy to write
portable setup scripts for it.
> So far I still think that we should panic if fsync() returns any error
> number at all. For sync_file_range(), it sounds like maybe you think
> we should leave the warning-spewing in there for ENOSYS, to do exactly
> what we did before on principle since that's what back-branches are
> all about? Something like:
>
> ereport(errno == ENOSYS ? WARNING : data_sync_elevel(WARNING),
>
> Perhaps for master we could skip it completely, or somehow warn just
> once, and/or switch to one of our other implementations at runtime? I
> don't really have a strong view on that, not being a user of that
> system. Will they ever implement it? Are there other systems we care
> about that don't implement it? (Android?)
I'm not sure I see much need for leaving the warning in out of
principle. Feels like we ought to sync_file_range once at postmaster
startup and then just force-disable the flush GUCs if not available?
Greetings,
Andres Freund