On Wed, Feb 10, 2010 at 9:43 AM, Justin Graf <justin@magwerks.com> wrote:
> Keep in mind each connection/client that connecting to the server
> creates a new process on the server. Each one the settings you list
> above is the max amount of memory each one of those sessions is allowed
> to consume.
It's even worse for work_mem (formerly sort_mem) in that each
individual hash agg or sort can grab that much memory. A complex
query with 4 sorts and 2 hash aggregates could chew through 6 x
work_mem if it needed it. Which is why work_mem can be such a
horrific foot gun.