pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: contrib/start-scripts/linux failing on RHEL 6 with ~9.3 because of missing oom_score_adj
Date: Sun, 26 Apr 2015 09:37:00 -0400
Message-ID: <7614.1430055420@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqSZatgCwvUZKHV313OhBFW5X+X+o7F=jHDuvr=8cR9owA@mail.gmail.com>
References: <CAB7nPqQcCSBDAWO45hH0FWDcHi_HcxHmyMLukiMzaDcd0W06sA@mail.gmail.com>
	<13161.1430005674@sss.pgh.pa.us>
	<CAB7nPqSZatgCwvUZKHV313OhBFW5X+X+o7F=jHDuvr=8cR9owA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Michael Paquier <michael.paquier@gmail.com> writes:
> On Sun, Apr 26, 2015 at 8:47 AM, Tom Lane <tgl@sss.pgh.pa.us> 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



view thread (5+ messages)  latest in thread

Message-ID: <7614.1430055420@sss.pgh.pa.us>
Permalink:  ../7614.1430055420@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7614.1430055420@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael.paquier@gmail.com
  Subject: Re: contrib/start-scripts/linux failing on RHEL 6 with ~9.3 because of missing oom_score_adj
  In-Reply-To: <7614.1430055420@sss.pgh.pa.us>
  References: <CAB7nPqQcCSBDAWO45hH0FWDcHi_HcxHmyMLukiMzaDcd0W06sA@mail.gmail.com> <13161.1430005674@sss.pgh.pa.us> <CAB7nPqSZatgCwvUZKHV313OhBFW5X+X+o7F=jHDuvr=8cR9owA@mail.gmail.com> <7614.1430055420@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox