Re: Postgres, fsync, and OSs (specifically linux) - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: Postgres, fsync, and OSs (specifically linux)
Date
Msg-id CAMsr+YEcv3gvLHX-gTMnA0Z_YCChJ+rCMTGnx1aQMUFmp4Lvbw@mail.gmail.com
Whole thread Raw
In response to Re: Postgres, fsync, and OSs (specifically linux)  (Andres Freund <andres@anarazel.de>)
Responses Re: Postgres, fsync, and OSs (specifically linux)  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 10 May 2018 at 06:55, Andres Freund <andres@anarazel.de> wrote:

> Do you have a patchset including that?  I didn't find anything after a
> quick search...

There was an earlier rev on the other thread but without msync checks.

I've added panic for msync in the attached, and tidied the comments a bit.

I didn't add comments on why we panic to each individual pg_fsync or
FileSync caller that panics; instead pg_fsync points to
pg_fsync_no_writethrough which explains it briefly and has links.

I looked at callers of pg_fsync, pg_fsync_no_writethrough,
pg_fsync_writethrough, mdsync, and FileSync when writing this.

WAL writing already PANIC'd on fsync failure, which helps, though we
now know that's not sufficient for complete safety.


Patch on top of v11 HEAD @ ddc1f32ee507

-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Indexes on partitioned tables and foreign partitions
Next
From: Alvaro Herrera
Date:
Subject: Re: Should we add GUCs to allow partition pruning to be disabled?