Re: Postgres using more memory than it should - Mailing list pgsql-performance

From Matthew Wakeling
Subject Re: Postgres using more memory than it should
Date
Msg-id alpine.DEB.1.10.0812041132390.4666@aragorn.flymine.org
Whole thread Raw
In response to Re: Postgres using more memory than it should  (hubert depesz lubaczewski <depesz@depesz.com>)
Responses Re: Postgres using more memory than it should
List pgsql-performance
On Wed, 3 Dec 2008, hubert depesz lubaczewski wrote:
> Check bug report from 2008-11-28, by Grzegorz Jaskiewicz:
> query failed, not enough memory on 8.3.5
>
> http://archives.postgresql.org/pgsql-bugs/2008-11/msg00180.php

Thanks, that does explain everything. So workmem is not a hard limit on
the amount of memory used per hash. Once the planner has committed to
using a hash (and it can only use estimates to work out whether it will
fit in workmem), then the execution will blindly go ahead and try and fit
absolutely everything in a hash in memory even if it doesn't fit in
workmem.

I agree it would be nice to fix this, but I'm not sure how at the moment.

Matthew

--
 To most people, solutions mean finding the answers. But to chemists,
 solutions are things that are still all mixed up.

pgsql-performance by date:

Previous
From: "Kynn Jones"
Date:
Subject: Re: How to profile an "SQL script"?
Next
From: Matthew Wakeling
Date:
Subject: Re: Postgres using more memory than it should