Re: BUG #8687: HashAggregate runs out of memory - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #8687: HashAggregate runs out of memory
Date
Msg-id CAB7nPqQoeYetpzokj_8n2w=MXhz1eJSDsA5oFZAd1=bj=NXgEw@mail.gmail.com
Whole thread Raw
In response to BUG #8687: HashAggregate runs out of memory  (peters@mitre.org)
Responses Re: BUG #8687: HashAggregate runs out of memory  ("Sylvester, Peter A." <peters@mitre.org>)
List pgsql-bugs
On Fri, Dec 20, 2013 at 12:09 PM,  <peters@mitre.org> wrote:
> The following bug has been logged on the website:
>
> Bug reference:      8687
> Logged by:          Peter Sylvester
> Email address:      peters@mitre.org
> PostgreSQL version: 9.3.2
> Operating system:   CENTOS6
> Description:
>
> I have a query which causes out of memory conditions with a HashAggregate
> plan.
>
>
> The query involves a join between a 10M row table and a 1K row table,
> work_mem=300MB, process space goes over 6GB then machine runs out of memory
> and swap and the OS kills the back end process.
>
> I have a test script which I can upload to recreate the issue.
And this would be welcome. In this case the most interesting part is
the test case you could provide, perhaps this could show up some
memory not free'd in the code path you use for your query. It is hard
to tell what might be going wrong in your case, so first are you sure
that you weren't trapped by the fact that work_mem allocates its
amount of memory for each sort/limit/hash operation?

Regards,
--
Michael

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #8696: Type-checking seems to fail on UNIONs with arrays
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #8470: 9.3 locking/subtransaction performance regression