Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VZGyO-00050S-RT for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Oct 2013 09:12:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VZGyO-0000PD-A5 for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Oct 2013 09:12:56 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VZGyM-0000NY-NE for pgsql-bugs@postgresql.org; Thu, 24 Oct 2013 09:12:54 +0000 Received: from d4b26f12.static.ziggozakelijk.nl ([212.178.111.18] helo=storagefox.foxi.nl) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VZGyF-0005bl-ES for pgsql-bugs@postgresql.org; Thu, 24 Oct 2013 09:12:54 +0000 Received: from techfox.foxi (techfox.foxi [192.168.0.31]) by storagefox.foxi.nl (8.14.5/8.14.5) with ESMTP id r9O9ChOY011544; Thu, 24 Oct 2013 11:12:43 +0200 From: Frank van Vugt To: pgsql-bugs@postgresql.org Cc: Stephen Frost , Valentine Gogichashvili , ftm.van.vugt@foxi.nl Subject: Re: array_agg() on a set larger than some arbitrary(?) limit causes runaway memory usage and eventually memory exhaustion Date: Thu, 24 Oct 2013 11:12:43 +0200 Message-ID: <1450179.hff3dGHaxZ@techfox.foxi> Organization: Foxi Group User-Agent: KMail/4.10.5 (Linux/3.7.10-1.16-desktop; KDE/4.10.5; x86_64; ; ) In-Reply-To: <20131021144726.GF2706@tamriel.snowman.net> References: <3839201.Nfa2RvcheX@techfox.foxi> <2334937.gaPyc11YQv@techfox.foxi> <20131021144726.GF2706@tamriel.snowman.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hi Stephen, Op maandag 21 oktober 2013 10:47:26 schreef Stephen Frost: > > 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. I did not describe this the way I should have, I meant to say that I do exactly that: disable the OOM-killer _always_ in a production situation since there it is _really_ needed. I noticed on the development machine where I did the testing that the correct child process was being killed, which used to not be the case. Thanks for emphasizing this, though. -- Best, Frank. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs