Re: /proc/self/oom_adj is deprecated in newer Linux kernels

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gurjeet Singh <gurjeet(at)singh(dot)im>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: /proc/self/oom_adj is deprecated in newer Linux kernels
Date: 2014-06-17 00:42:48
Message-ID: 27626.1402965768@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gurjeet Singh <gurjeet(at)singh(dot)im> writes:
> Please find attached the patch. It includes the doc changes as well.

What exactly is the point of the static state you added here? There
is no situation where that could possibly be useful, because this
code is executed at most once per process, and not at all in the
postmaster. AFAICS, that's just complication (and permanent waste
of a kilobyte of static data space) for no return.

Also, this seems to try to write the file whether or not the environment
variable was set, which wasn't the plan.

I also don't really see the point of parsing the value variable into an
int. Why not just spit it out as the original string? It's not ours to
legislate whether the kernel will take a value that's not an integer.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-06-17 00:47:41 Re: Doing better at HINTing an appropriate column within errorMissingColumn()
Previous Message Ian Barwick 2014-06-17 00:30:30 Re: Doing better at HINTing an appropriate column within errorMissingColumn()