Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WwhUL-0007T6-6c for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Jun 2014 00:43:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WwhUJ-00028I-PH for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Jun 2014 00:42:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WwhUI-000285-9Z for pgsql-hackers@postgresql.org; Tue, 17 Jun 2014 00:42:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WwhUF-0003av-EF for pgsql-hackers@postgresql.org; Tue, 17 Jun 2014 00:42:56 +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 s5H0gm0s027627; Mon, 16 Jun 2014 20:42:48 -0400 From: Tom Lane To: Gurjeet Singh cc: Andres Freund , Peter Eisentraut , PGSQL Hackers Subject: Re: /proc/self/oom_adj is deprecated in newer Linux kernels In-reply-to: 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> <16241.1316441883@sss.pgh.pa.us> <20140610143202.GI8406@alap3.anarazel.de> <30402.1402412692@sss.pgh.pa.us> <20140610150933.GK8406@alap3.anarazel.de> <30709.1402413628@sss.pgh.pa.us> <20140610153347.GM8406@alap3.anarazel.de> <31348.1402415537@sss.pgh.pa.us> <31652.1402416356@sss.pgh.pa.us> Comments: In-reply-to Gurjeet Singh message dated "Thu, 12 Jun 2014 16:35:10 -0400" Date: Mon, 16 Jun 2014 20:42:48 -0400 Message-ID: <27626.1402965768@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Gurjeet Singh 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers