Re: Memory usage and configuration settings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike C <smith(dot)not(dot)western(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Memory usage and configuration settings
Date: 2012-03-05 17:13:24
Message-ID: 13258.1330967604@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mike C <smith(dot)not(dot)western(at)gmail(dot)com> writes:
> Ok, that makes sense. With regards to work_mem, am I right in thinking
> the child processes only allocate enough memory to meet the task at
> hand, rather than the full 16M specified in the config file?

They only allocate what's needed ... but you have to keep in mind that
work_mem is *per operation*, eg per sort or hash. A complex query could
require several such steps and thus eat several times work_mem.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2012-03-05 19:34:27 Re: Return unknown resultset from a function
Previous Message Mike C 2012-03-05 17:03:03 Re: Memory usage and configuration settings