On 04/09/2018 02:16 PM, Craig Ringer wrote:
I'd like a middle ground where the kernel lets us register our interest
and tells us if it lost something, without us having to keep eight
million FDs open for some long period. "Tell us about anything that
happens under pgdata/" or an inotify-style per-directory-registration
option. I'd even say that's ideal.
Could there be a risk of a race condition here where fsync incorrectly
returns success before we get the notification of that something went wrong?