On Mon, 2 Dec 2019 at 13:43, Thomas Munro <thomas.mu...@gmail.com> wrote:

>
> 1.  Some code opens a file, writes some stuff to it, closes, and then
> fsyncs it, and if that fails and and it ever retries it'll redo all of
> those steps again.  We know that some kernels might have thrown away
> the data, but we don't care about the copy in the kernel's cache
> because we'll write it out again next time around.
>

Can we trust the kernel to be reporting the EIO or ENOSPC only from
writeback buffers for the actual file we're fsync()ing though? Not from
buffers it flushed while performing our fsync() request, failed to flush,
and complained about?

I'm not confident I want to assume that.
-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 2ndQuadrant - PostgreSQL Solutions for the Enterprise

Reply via email to