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

From: Tomas Vondra <tv(at)fuzzy(dot)cz>
To: 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 00:37:18
Message-ID: 526325BE.6020501@fuzzy.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 19.10.2013 21:02, Valentine Gogichashvili wrote:
> Hi Frank,
>
> this is a little bit not relevant to the question itself. But to prevent
> OOM killer from currupting your database please consider this for your
> production environments:
> http://www.postgresql.org/docs/9.1/static/kernel-resources.html#LINUX-MEMORY-OVERCOMMIT

Not sure what's your suggestion? The problem is that the database is
actually using the memory, so overcommit is not directly applicable here.

He might easily add more swap to "fix" the issue, but it will take ages
to actually execute the query because of the overhead.

Tomas

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Vondra 2013-10-20 02:48:01 Re: array_agg() on a set larger than some arbitrary(?) limit causes runaway memory usage and eventually memory exhaustion
Previous Message jackie.qq.chang 2013-10-19 21:49:05 BUG #8540: Avoid sscanf buffer overflow