Re: SET work_mem = '1TB'; - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: SET work_mem = '1TB';
Date
Msg-id 20130618175236.GS23363@tamriel.snowman.net
Whole thread Raw
In response to Re: SET work_mem = '1TB';  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
* Josh Berkus (josh@agliodbs.com) wrote:
> Well, I think that someone needs to actually test doing a sort with,
> say, 100GB of RAM and make sure it doesn't crash.  Anyone have a machine
> they can try that on?

It can be valuable to bump up work_mem well beyond the amount of system
memory actually available on the system to get the 'right' plan to be
chosen (which often ends up needing much less actual memory to run).

I've used that trick on a box w/ 512GB of RAM and had near-100G PG
backend processes which were doing hashjoins.  Don't think I've ever had
it try doing a sort w/ a really big work_mem.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: SET work_mem = '1TB';
Next
From: Josh Berkus
Date:
Subject: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])