Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WxQ0k-0007ea-OC for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jun 2014 00:15:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WxQ0k-0001Yo-36 for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Jun 2014 00:15:26 +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 1WxQ0i-0001YI-UE for pgsql-hackers@postgresql.org; Thu, 19 Jun 2014 00:15:25 +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 1WxQ0g-0007qn-1k for pgsql-hackers@postgresql.org; Thu, 19 Jun 2014 00:15:23 +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 s5J0FEJi004409; Wed, 18 Jun 2014 20:15:14 -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: Wed, 18 Jun 2014 20:15:14 -0400 Message-ID: <4408.1403136914@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-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Gurjeet Singh writes: > On Tue, Jun 10, 2014 at 12:05 PM, Tom Lane wrote: >> If we're going to do this, I would say that we should also take the >> opportunity to get out from under the question of which kernel API >> we're dealing with. So perhaps a design like this: >> >> 1. If the environment variable PG_OOM_ADJUST_FILE is defined, it's >> the name of a file to write something into after forking. The typical >> value would be "/proc/self/oom_score_adj" or "/proc/self/oom_adj". >> If not set, nothing happens. >> >> 2. If the environment variable PG_OOM_ADJUST_VALUE is defined, that's >> the string we write, otherwise we write "0". > Please find attached the patch. It includes the doc changes as well. Applied with some editorialization. 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