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

From Christophe Pettus
Subject Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS
Date
Msg-id 67F91A87-A7AA-4062-803F-8D2086DAB5A0@thebuild.com
Whole thread Raw
In response to Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS  (Greg Stark <stark@mit.edu>)
Responses Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS
List pgsql-hackers
> On Apr 8, 2018, at 14:23, Greg Stark <stark@mit.edu> wrote:
>
> They consider dirty filesystem buffers when there's
> hardware failure preventing them from being written "a memory leak".

That's not an irrational position.  File system buffers are *not* dedicated memory for file system caching; they're
beingused for that because no one has a better use for them at that moment.  If an inability to flush them to disk
meantthat they suddenly became pinned memory, a large copy operation to a yanked USB drive could result in the system
havingno more allocatable memory.  I guess in theory that they could swap them, but swapping out a file system buffer
inhopes that sometime in the future it could be properly written doesn't seem very architecturally sound to me. 

--
-- Christophe Pettus
   xof@thebuild.com



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS
Next
From: Anthony Iliopoulos
Date:
Subject: Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS