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

From Tom Lane
Subject Re: /proc/self/oom_adj is deprecated in newer Linux kernels
Date
Msg-id 28946.1402408948@sss.pgh.pa.us
Whole thread Raw
In response to Re: /proc/self/oom_adj is deprecated in newer Linux kernels  (Gurjeet Singh <gurjeet@singh.im>)
Responses Re: /proc/self/oom_adj is deprecated in newer Linux kernels  (Robert Haas <robertmhaas@gmail.com>)
Re: /proc/self/oom_adj is deprecated in newer Linux kernels  (Gurjeet Singh <gurjeet@singh.im>)
Re: /proc/self/oom_adj is deprecated in newer Linux kernels  (David G Johnston <david.g.johnston@gmail.com>)
Re: /proc/self/oom_adj is deprecated in newer Linux kernels  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers
Gurjeet Singh <gurjeet@singh.im> writes:
> Startup scripts are not solely in the domain of packagers. End users
> can also be expected to develop/edit their own startup scripts.

> Providing it as GUC would have given end users both the peices, but
> with a compile-time option they have only one half of the solution;
> except if they go compile their own binaries, which forces them into
> being packagers.

I don't find that this argument holds any water at all.  Anyone who's
developing their own start script can be expected to manage recompiling
Postgres.

Extra GUCs do not have zero cost, especially not ones that are as
complicated-to-explain as this would be.

I would also argue that there's a security issue with making it a GUC.
A non-root DBA should not have the authority to decide whether or not
postmaster child processes run with nonzero OOM adjustment; that decision
properly belongs to whoever has authorized the root-owned startup script
to change the adjustment in the first place.  So seeing this as two
independent pieces is not only wrong but dangerous.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [bug fix] Memory leak in dblink
Next
From: Robert Haas
Date:
Subject: Re: "cancelling statement due to user request error" occurs but the transaction has committed.