Re: Postgres, fsync, and OSs (specifically linux)
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>, Craig Ringer <craig@2ndquadrant.com>, Heikki Linnakangas <hlinnaka@iki.fi>, Robert Haas <robertmhaas@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-05-22T20:02:07Z
Lists: pgsql-hackers
On 2018-05-22 21:58:06 +0200, Dmitry Dolgov wrote: > > On 22 May 2018 at 20:59, Andres Freund <andres@anarazel.de> wrote: > > On 2018-05-22 20:54:46 +0200, Dmitry Dolgov wrote: > > Huh? Checkpointer was in SendFsyncRequest()? Coudl you share the > > backtrace? > > Well, that's what I've got from gdb: > #3 0x000000000077ad08 in WaitLatchOrSocket > (latch=latch@entry=0x0, wakeEvents=wakeEvents@entry=4, sock=8, > timeout=timeout@entry=-1, wait_event_info=wait_event_info@entry=0) at > latch.c:385 > #4 0x00000000007152cb in SendFsyncRequest > (request=request@entry=0x7ffe37529f40, fd=fd@entry=-1) at > checkpointer.c:1345 > #5 0x0000000000716223 in AbsorbAllFsyncRequests () at checkpointer.c:1207 Oh, I see. That makes sense. So it's possible to self-deadlock here. Should be easy to fix... Thanks for finding that one. > Yes, this patch solves the problem, thanks. Just avoids it, I'm afraid... It probably can't be hit easily, but the issue is there... - Andres
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