Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A8D7365018A for ; Thu, 28 Aug 2008 11:50:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 18068-03-6 for ; Thu, 28 Aug 2008 11:50:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by postgresql.org (Postfix) with ESMTP id 2815B650285 for ; Thu, 28 Aug 2008 11:48:35 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Thu, 28 Aug 2008 09:48:33 -0500 Message-Id: <48B67465.EE98.0025.0@wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0.3 Date: Thu, 28 Aug 2008 09:48:21 -0500 From: "Kevin Grittner" To: "Bill Moran" , "Matthew Wakeling" Cc: Subject: Re: select on 22 GB table causes"An I/O error occured while sending to the backend." exception References: <82bpze3ou8.fsf@mid.bfk.de> <20080828095325.3c95f867.wmoran@collaborativefusion.com> In-Reply-To: <20080828095325.3c95f867.wmoran@collaborativefusion.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200808/371 X-Sequence-Number: 31252 >>> Bill Moran wrote: > In response to Matthew Wakeling : >> >> Probably the best solution is to just tell the kernel somehow to never >> kill the postmaster. > > This thread interested me enough to research this a bit. > > In linux, it's possible to tell the OOM killer never to consider > certain processes for the axe, using /proc magic. See this page: > http://linux-mm.org/OOM_Killer > > Perhaps this should be in the PostgreSQL docs somewhere? That sure sounds like a good idea. Even though the one time the OOM killer kicked in on one of our servers, it killed a runaway backend and not the postmaster ( http://archives.postgresql.org/pgsql-bugs/2008-07/msg00105.php ), I think I will modify our service scripts in /etc/init.d/ to pick off the postmaster pid after a start and echo -16 (or some such) into the /proc//oom_adj file (which is where I found the file on my SuSE system). Thanks for the research and the link! -Kevin