pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Moench-Tegeder <cmt@burggraben.net>
To: klaus.mailinglists@pernau.at
Cc: pgsql-general@postgresql.org
Subject: Re: PANIC:  could not flush dirty data: Cannot allocate memory
Date: Mon, 14 Nov 2022 22:54:03 +0100
Message-ID: <Y3K4+z5fP9mNElMj@elch.exwg.net> (raw)
In-Reply-To: <ec01f7af535c0c38711a317cba2aa310@pernau.at>
References: <ec01f7af535c0c38711a317cba2aa310@pernau.at>

## klaus.mailinglists@pernau.at (klaus.mailinglists@pernau.at):

> On several servers we see the error message: PANIC:  could not flush 
> dirty data: Cannot allocate memory

As far as I can see, that "could not flush dirty data" happens total
three times in the code - there are other places where postgresql could
PANIC on fsync()-and-stuff-related issues, but they have different
messages.
Of these three places, there's an sync_file_range(), an posix_fadvise()
and an msync(), all in src/backend/storage/file/fd.c. "Cannot allocate
memory" would be ENOMEM, which posix_fadvise() does not return (as per
it's docs). So this would be sync_file_range(), which could run out
of memory (as per the manual) or msync() where ENOMEM actually means
"The indicated memory (or part of it) was not mapped". Both cases are
somewhat WTF for this setup.
What filesystem are you running?

Regards,
Christoph

-- 
Spare Space





view thread (12+ messages)  latest in thread

Message-ID: <Y3K4+z5fP9mNElMj@elch.exwg.net>
Permalink:  ../Y3K4+z5fP9mNElMj@elch.exwg.net/
Also on:    postgresql.org/message-id/Y3K4+z5fP9mNElMj@elch.exwg.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: cmt@burggraben.net, klaus.mailinglists@pernau.at
  Subject: Re: PANIC:  could not flush dirty data: Cannot allocate memory
  In-Reply-To: <Y3K4+z5fP9mNElMj@elch.exwg.net>
  References: <ec01f7af535c0c38711a317cba2aa310@pernau.at> <Y3K4+z5fP9mNElMj@elch.exwg.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox