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

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Robert Haas <robertmhaas(at)gmail(dot)com>, Anthony Iliopoulos <ailiop(at)altatus(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-08 02:37:47
Message-ID: 4D807834-B7E2-4D61-8EEE-E72DA7CAAF69@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> On Apr 7, 2018, at 19:33, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Idea 4 would be for people to assume their database is corrupt if their
> server logs report any I/O error on the file systems Postgres uses.

Pragmatically, that's where we are right now. The best answer in this bad situation is (a) fix the error, then (b) replay from a checkpoint before the error occurred, but it appears we can't even guarantee that a PostgreSQL process will be the one to see the error.

--
-- Christophe Pettus
xof(at)thebuild(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-04-08 02:49:39 Re: pgsql: Support partition pruning at execution time
Previous Message Bruce Momjian 2018-04-08 02:33:37 Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS