Re: Limit allocated memory per session - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Limit allocated memory per session
Date
Msg-id 20091001144915.GB5607@alvh.no-ip.org
Whole thread Raw
In response to Limit allocated memory per session  (daveg <daveg@sonic.net>)
Responses Re: Limit allocated memory per session  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
daveg wrote:
> 
> I'd like to propose adding a new GUC to limit the amount of memory a backend
> can allocate for its own use. The problem this addresses is that sometimes
> one needs to set work_mem fairly high to get good query plans for large joins.
> However, some complex queries will then use huge amounts of memory so that
> one or a few of them will consume all the memory on the host and run it deep
> into swap or trigger the oom killer or worse.

Oh, BTW, did anyone get interested in adding the bits to disable the OOM
killer for postmaster on the various Linux initscripts?  It needs some
games with /proc/<pid>/oom_adj and requires root privileges, but I think
an initscript is in an excellent position to do it.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: navigation menu for documents
Next
From: Alvaro Herrera
Date:
Subject: Re: CommitFest 2009-09, two weeks on