Re: How exactly PostgreSQL allocates memory for its needs? - Mailing list pgsql-performance

From Scott Marlowe
Subject Re: How exactly PostgreSQL allocates memory for its needs?
Date
Msg-id dcc563d11002101946o36d022e6me20c65cfff81b894@mail.gmail.com
Whole thread Raw
In response to Re: How exactly PostgreSQL allocates memory for its needs?  (Justin Graf <justin@magwerks.com>)
List pgsql-performance
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.

pgsql-performance by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)
Next
From: Tom Lane
Date:
Subject: Re: Re: 512,600ms query becomes 7500ms... but why? Postgres 8.3 query planner quirk?