From: Stephen Frost <sfrost@snowman.net>
To: Frank van Vugt <ftm.van.vugt@foxi.nl>
Cc: Valentine Gogichashvili <valgog@gmail.com>
Cc: PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Subject: Re: array_agg() on a set larger than some arbitrary(?) limit causes runaway memory usage and eventually memory exhaustion
Date: Mon, 21 Oct 2013 10:47:26 -0400
Message-ID: <20131021144726.GF2706@tamriel.snowman.net> (raw)
In-Reply-To: <2334937.gaPyc11YQv@techfox.foxi>
References: <3839201.Nfa2RvcheX@techfox.foxi>
<CAP93muUfwRvg6EpdNZh=5viaZUUXfzm1do3EkkKBTJiC-9Jeaw@mail.gmail.com>
<2334937.gaPyc11YQv@techfox.foxi>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
* Frank van Vugt (ftm.van.vugt@foxi.nl) wrote:
> Op zaterdag 19 oktober 2013 21:02:25 schreef Valentine Gogichashvili:
> > 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:
>
> 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.
The correct child being killed doesn't actually mean that it's a *good
idea* to kill off PG child processes, in general, particularly in the
way that the OOM killer goes about it (kill -9). If it was possible to
tune the OOM killer to use a different signal, which would allow PG to
actually clean things up, it *might* be reasonable to allow it, but I
still wouldn't recommend it.
In production, for my part, proper memory accounting (and disabling of
OOM) should *always* be used.
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 197B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: sfrost@snowman.net, ftm.van.vugt@foxi.nl, valgog@gmail.com
Subject: Re: array_agg() on a set larger than some arbitrary(?) limit causes runaway memory usage and eventually memory exhaustion
In-Reply-To: <20131021144726.GF2706@tamriel.snowman.net>
References: <3839201.Nfa2RvcheX@techfox.foxi> <CAP93muUfwRvg6EpdNZh=5viaZUUXfzm1do3EkkKBTJiC-9Jeaw@mail.gmail.com> <2334937.gaPyc11YQv@techfox.foxi> <20131021144726.GF2706@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox