Re: Out of Memory and Configuration Problems (Big Computer) - Mailing list pgsql-general

From Stephen Frost
Subject Re: Out of Memory and Configuration Problems (Big Computer)
Date
Msg-id 20100602114110.GB21875@tamriel.snowman.net
Whole thread Raw
In response to Re: Out of Memory and Configuration Problems (Big Computer)  (Tom Wilcox <hungrytom@googlemail.com>)
List pgsql-general
* Tom Wilcox (hungrytom@googlemail.com) wrote:
> My plan now is to try increasing the shared_buffers, work_mem,
> maintenance_work_mem and apparently checkpoint_segments and see if that
> fixes it.

errrrr.  work_mem and maintenance_work_mem aren't *limits*, they're
more like *targets*.  The out of memory error you're getting isn't
because PG is hitting a limit you've set in postgresql.conf- it's
happening because PG is asking the OS for more memory (eg: malloc) and
getting told "sorry, no more available".  To that end, you probably want
to consider *lowering* the above parameters (in particular,
maintenance_work_mem, since that's what ANALYZE uses, iirc).  That will
cause PG to use less memory and/or spill things to disk instead of
trying to ask the OS for more memory than it has available.

What are those values currently set to?  How much memory is in the box?
Have you looked at PG's memory usage while these queries are running?
Do you have any swap?

    Thanks,

        Stephen

Attachment

pgsql-general by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Disable executing external commands from psql?
Next
From: Stephen Frost
Date:
Subject: Re: Is it possible to make the order of output the same as the order of input parameters?