On Tue, Sep 22, 2009 at 1:46 PM, Alan McKay <alan(dot)mckay(at)gmail(dot)com> wrote:
>> Best practice to avoid that, is to bump the work_mem temporarily
>> before the query, and than lower it again, lowers the chance of memory
>> exhaustion.
>
> Interesting - I can do that dynamically?
you can do set work_mem=128M; select 1; set work_mem=64M;
etc, in one query.
--
GJ