/proc/self/oom_adj is deprecated in newer Linux kernels - Mailing list pgsql-hackers

While testing 9.1 RPMs on Fedora 15 (2.6.40 kernel), I notice
messages like these in the kernel log:

Sep 11 13:38:56 rhl kernel: [  415.308092] postgres (18040): /proc/18040/oom_adj is deprecated, please use
/proc/18040/oom_score_adjinstead.
 

These don't show up on every single PG process launch, but that probably
just indicates there's a rate-limiter in the kernel reporting mechanism.

So it looks like it behooves us to cater for oom_score_adj in the
future.  The simplest, least risky change that I can think of is to
copy-and-paste the relevant #ifdef code block in fork_process.c.
If we do that, then it would be up to the packager whether to #define
LINUX_OOM_ADJ or LINUX_OOM_SCORE_ADJ or both depending on the behavior
he wants.

That would be good enough for my own purposes in building Fedora/RHEL
packages, since I can predict with confidence which kernel versions a
given build is likely to be used with.  I think probably the same
would be true for most other distro-specific builds.  Does anyone want
to argue for doing something more complicated, and if so what exactly?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Susanne Ebrecht
Date:
Subject: Re: Is there really no interest in SQL Standard?
Next
From: Dave Page
Date:
Subject: Re: Is there really no interest in SQL Standard?