Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 542EA930E1E for ; Fri, 3 Aug 2012 15:33:09 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SxMgM-0000BL-GS for pgsql-admin@postgresql.org; Fri, 03 Aug 2012 18:33:08 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q73IWquN004274; Fri, 3 Aug 2012 14:32:52 -0400 (EDT) From: Tom Lane To: Radovan Jablonovsky cc: Kevin Grittner , pgsql-admin Subject: Re: PostgreSQL oom_adj postmaster process to -17 In-reply-to: References: <501925AD020000250004932E@gw.wicourts.gov> Comments: In-reply-to Radovan Jablonovsky message dated "Fri, 03 Aug 2012 12:08:45 -0600" Date: Fri, 03 Aug 2012 14:32:52 -0400 Message-ID: <4273.1344018772@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/32 X-Sequence-Number: 39853 Radovan Jablonovsky writes: > In usual load there are not much pressure on memory, but it is possible to > have all clients start using heavy reports. They are valid requests and > could consume all memory. In this border and not likely but possible > scenario it could be useful to let OOM killer to kill client's > processes/connections but leave PostgreSQL system processes (postmaster, > writer, stat, log, streaming, ...) excluded from reach of OOM killer. The code already supports excluding the postmaster itself from OOM kills while letting its children be subject to them. Being selective about which children are subject is pointless, though: if any child is kill -9'd, we have to zap the rest and restart, because there is no way to be sure that the victim left shared memory in a consistent state. regards, tom lane