Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id DA96CB5DC99 for ; Mon, 19 Sep 2011 11:18:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 19417-06-3 for ; Mon, 19 Sep 2011 14:18:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id DAA70B5DC42 for ; Mon, 19 Sep 2011 11:18:05 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p8JEI3Tl016242; Mon, 19 Sep 2011 10:18:03 -0400 (EDT) To: Peter Eisentraut cc: pgsql-hackers@postgreSQL.org Subject: Re: /proc/self/oom_adj is deprecated in newer Linux kernels In-reply-to: <1316420754.14001.3.camel@fsopti579.F-Secure.com> References: <29121.1316185073@sss.pgh.pa.us> <1316355543.12186.9.camel@vanquo.pezone.net> <15953.1316362868@sss.pgh.pa.us> <1316420754.14001.3.camel@fsopti579.F-Secure.com> Comments: In-reply-to Peter Eisentraut message dated "Mon, 19 Sep 2011 11:25:54 +0300" Date: Mon, 19 Sep 2011 10:18:03 -0400 Message-ID: <16241.1316441883@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/855 X-Sequence-Number: 195044 Peter Eisentraut writes: > On sön, 2011-09-18 at 12:21 -0400, Tom Lane wrote: >> But having said that, it wouldn't be very hard to arrange things so that >> if you did have both symbols defined, the code would only attempt to >> write oom_adj if it had failed to write oom_score_adj; which is about as >> close as you're likely to get to a kernel version test for this. > Why is this feature not a run-time configuration variable or at least a > configure option? It's awfully well hidden now. I doubt a lot of > people are using this even though they might wish to. See the thread in which the feature was designed originally: http://archives.postgresql.org/pgsql-hackers/2010-01/msg00170.php The key point is that to get useful behavior, you need cooperation between both a root-privileged startup script and the PG executable. That tends to throw the problem into the domain of packagers, more than end users, and definitely puts a big crimp in the idea that run-time configuration of just half of the behavior could be helpful. So far, no Linux packagers have complained that the design is inadequate (a position that I also hold when wearing my red fedora) so I do not feel a need to complicate it further. regards, tom lane