Re: Reducing memory usage of insert into select operations? - Mailing list pgsql-general

From Douglas McNaught
Subject Re: Reducing memory usage of insert into select operations?
Date
Msg-id 5ded07e00807180653u4dcab72bl703b2f7afc585cf8@mail.gmail.com
Whole thread Raw
In response to Re: Reducing memory usage of insert into select operations?  (Francisco Reyes <lists@stringsutils.com>)
Responses Re: Reducing memory usage of insert into select operations?
List pgsql-general
On Fri, Jul 18, 2008 at 12:18 AM, Francisco Reyes
<lists@stringsutils.com> wrote:
> Douglas McNaught writes:
>
>
>> It does seem that reducing work_mem might help you, but others on this
>
> I reduced it from 256MB to 64MB. It seems it is helping.

You should also look at your memory overcommit settings (in
/proc/sys/vm).  You can set things up so that Postgres gets a malloc()
failure (which it is generally prepared to cope with cleanly) when the
system runs out of RAM, rather than having the OOM killer go off and
hit it with SIGKILL.  Overcommit is useful in some contexts (Java apps
tend to map a lot more memory than they actually use) but for a
dedicated database server you really don't ever want to have the OOM
killer triggered.

-Doug

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: TODO list and "hyphen"
Next
From: Glyn Astill
Date:
Subject: Re: Initdb problem on debian mips cobalt: Bus error