Re: Some interesting news about Linux 3.12 OOM - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Some interesting news about Linux 3.12 OOM
Date
Msg-id CA+TgmoZwpOk+PpCqXykWE=gWF8uBhc9aG4eyMwNYE1-c7PEW2A@mail.gmail.com
Whole thread Raw
In response to Re: Some interesting news about Linux 3.12 OOM  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Thu, Sep 19, 2013 at 12:02 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> The "problem" is that it's not just about malloc() (aka brk() and
> mmap()) and friends. It's about many of the other systemcalls. Like
> e.g. send() to name one of the more likely ones.

*shrug*

If you're using for send() and not testing for a -1 return value,
you're writing amazingly bad code anyway.  And if you ARE testing for
-1, you'll probably do something at least mildly sensible with a
not-specifically-foreseen errno value, like print a message that
includes %m.  That's about what we'd probably do, and I have to
imagine what most people would do.

I'm not saying it won't break anything to return a proper error code;
I'm just saying that sending SIGKILL is worse.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: logical changeset generation v6
Next
From: Dimitri Fontaine
Date:
Subject: Re: Some interesting news about Linux 3.12 OOM