Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id D1AF5B5DBD1 for ; Sun, 18 Sep 2011 11:19:10 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 14416-02 for ; Sun, 18 Sep 2011 14:19:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by mail.postgresql.org (Postfix) with SMTP id B62CEB5DBCE for ; Sun, 18 Sep 2011 11:19:03 -0300 (ADT) Received: (qmail invoked by alias); 18 Sep 2011 14:19:03 -0000 Received: from a88-115-218-165.elisa-laajakaista.fi (EHLO [10.0.0.102]) [88.115.218.165] by mail.gmx.net (mp061) with SMTP; 18 Sep 2011 16:19:03 +0200 X-Authenticated: #495269 X-Provags-ID: V01U2FsdGVkX1/VCORt4oTVOPRvHTNjkCJayRUeJ3Nc8xtp/ClugT zWMwS4j6PzU9bd Subject: Re: /proc/self/oom_adj is deprecated in newer Linux kernels From: Peter Eisentraut To: Tom Lane Cc: pgsql-hackers@postgreSQL.org Date: Sun, 18 Sep 2011 17:19:02 +0300 In-Reply-To: <29121.1316185073@sss.pgh.pa.us> References: <29121.1316185073@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.0.3- Content-Transfer-Encoding: 7bit Message-ID: <1316355543.12186.9.camel@vanquo.pezone.net> Mime-Version: 1.0 X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.403 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/825 X-Sequence-Number: 195014 On fre, 2011-09-16 at 10:57 -0400, Tom Lane wrote: > 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. There are lots of reasons why that won't work: backports, forward ports, derivatives, custom kernels, distribution upgrades, virtual hosting. ISTM that we could at least query the currently used kernel version.