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

From: Valentine Gogichashvili <valgog(at)gmail(dot)com>
To: Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: array_agg() on a set larger than some arbitrary(?) limit causes runaway memory usage and eventually memory exhaustion
Date: 2013-10-20 12:06:19
Message-ID: CAP93muVkB17HZYUufcvK8BBHkyPhvVmMyaXUDxPh+1JLwQVS+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Frank,

On Sun, Oct 20, 2013 at 10:26 AM, Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl>wrote:

> Sure, I understand why you'd want to mention this 'on the side', but I'm
> aware
> of OOM-tuning. In production, I use it wherever it's _really_ needed, but
> mind
> that the oom-killer in newer kernels is already selecting processes a bit
> smarter than it used to. In the example I gave, the correct child process
> was
> killed.
>
> I personally prefer to see ERROR: out of memory, coming from Postgres,
then OOM killing processes, that it thinks are to be killed :)

Apropos, how does the string_agg aggregate behave in your example? Will be
nice to know without experimenting myself and looking into the sources :)

Regards,

-- Valentine

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message warren 2013-10-21 02:54:46 BUG #8541: PGXS build fails due to 'include common/fe_memutils.h' which is not present
Previous Message Tomas Vondra 2013-10-20 10:57:43 Re: array_agg() on a set larger than some arbitrary(?) limit causes runaway memory usage and eventually memory exhaustion