Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YmMk7-00068y-N7 for pgsql-bugs@arkaria.postgresql.org; Sun, 26 Apr 2015 13:37:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YmMk7-0000W8-2f for pgsql-bugs@arkaria.postgresql.org; Sun, 26 Apr 2015 13:37:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YmMk6-0000W2-FT for pgsql-bugs@postgresql.org; Sun, 26 Apr 2015 13:37:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YmMk3-0007IA-3Q for pgsql-bugs@postgresql.org; Sun, 26 Apr 2015 13:37:05 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t3QDb0JK007615; Sun, 26 Apr 2015 09:37:00 -0400 From: Tom Lane To: Michael Paquier cc: pgsql-bugs@postgresql.org Subject: Re: contrib/start-scripts/linux failing on RHEL 6 with ~9.3 because of missing oom_score_adj In-reply-to: References: <13161.1430005674@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Sun, 26 Apr 2015 12:35:47 +0900" Date: Sun, 26 Apr 2015 09:37:00 -0400 Message-ID: <7614.1430055420@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Michael Paquier writes: > On Sun, Apr 26, 2015 at 8:47 AM, Tom Lane wrote: >> This patch seems completely wrong, as it is forcing use of the oom >> adjustment, whereas the intention is that the user should choose >> if they want to use it; cf /contrib/start-scripts/linux lines 43-55. > On REL9_3_STABLE, the condition the startup script has is that: > test x"$OOM_SCORE_ADJ" != x && echo "$OOM_SCORE_ADJ" > /proc/self/oom_score_adj > test x"$OOM_ADJ" != x && echo "$OOM_ADJ" > /proc/self/oom_adj Yeah, but by default $OOM_SCORE_ADJ is unset so that the echo is not executed. What you are proposing is that if the user has accidentally uncommented the wrong one of the two variables, the script should silently do nothing instead of failing. I think that's an actively bad idea, because then it would be far too hard to notice that you'd misconfigured it. In any case, I think changing the behavior of the script in stable branches would be unwise. People generally will use these things as templates, they won't just blindly copy them (at least I hope not); and they're unlikely to overwrite an existing live script file when installing a minor update release. We have changed the script, hopefully for the better, in HEAD --- if you think the behavior still leaves something to be desired, debating that would certainly be fair game. (I notice that HEAD *is* using a "test -e", which according to my argument above maybe isn't a good thing.) regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs