Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>, Anthony Iliopoulos <ailiop(at)altatus(dot)com>
Cc: Greg Stark <stark(at)mit(dot)edu>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Catalin Iacob <iacobcatalin(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS
Date: 2018-04-10 00:41:10
Message-ID: 648deced-f0d5-7402-b488-ca1edc496210@proxel.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

Andreas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-04-10 00:53:30 Re: Excessive PostmasterIsAlive calls slow down WAL redo
Previous Message Thomas Munro 2018-04-10 00:32:20 Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS