Re: array_agg() on a set larger than some arbitrary(?) limit causes runaway memory usage and eventually memory exhaustion

From: Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl>
To: pgsql-bugs(at)postgresql(dot)org
Cc: Valentine Gogichashvili <valgog(at)gmail(dot)com>, ftm(dot)van(dot)vugt(at)foxi(dot)nl
Subject: Re: array_agg() on a set larger than some arbitrary(?) limit causes runaway memory usage and eventually memory exhaustion
Date: 2013-10-24 09:12:14
Message-ID: 3716683.icChMuMX1C@techfox.foxi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Valentine,

Op zondag 20 oktober 2013 14:06:19 schreef Valentine Gogichashvili:
Apropos, how does the string_agg aggregate behave in your example?
Will be nice to know without experimenting myself and looking into the
sources :)

Interesting....

On the 1e7 dataset, our custom comcat() function runs for ~18.5
seconds and eats up to ~6,5 GB of memory, while the string_agg() on
the same dataset runs for ~23.5 seconds and eats up to ~16 GB of
memory.

--

Best,

Frank.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Frank van Vugt 2013-10-24 09:12:43 Re: array_agg() on a set larger than some arbitrary(?) limit causes runaway memory usage and eventually memory exhaustion
Previous Message Euler Taveira 2013-10-24 02:04:02 Re: BUG #8551: Erro reinstalação