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