Re: Postgres, fsync, and OSs (specifically linux)
Craig Ringer <craig@2ndquadrant.com>
From: Craig Ringer <craig@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>,
Simon Riggs <simon@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-05-10T01:50:03Z
Lists: pgsql-hackers
Attachments
- v2-0001-PANIC-when-we-detect-a-possible-fsync-I-O-error-i.patch (text/x-patch) patch v2-0001
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
Commits
-
PANIC on fsync() failure.
- 9ccdd7f66e33 12.0 landed
- f1ff5f51d249 9.4.21 landed
- 312435232217 9.5.16 landed
- b9cce9ddfa17 9.6.12 landed
- afbe03f65470 10.7 landed
- 6534d544cd77 11.2 landed
-
Fix and improve pg_atomic_flag fallback implementation.
- 8c3debbbf618 11.0 cited