Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vbssg-0006rW-26 for pgsql-bugs@arkaria.postgresql.org; Thu, 31 Oct 2013 14:05:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vbsse-0002ov-ID for pgsql-bugs@arkaria.postgresql.org; Thu, 31 Oct 2013 14:05:48 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vbssd-0002oo-Gq for pgsql-bugs@postgresql.org; Thu, 31 Oct 2013 14:05:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VbssX-0002zm-74 for pgsql-bugs@postgresql.org; Thu, 31 Oct 2013 14:05:46 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id r9VE5Glf022341; Thu, 31 Oct 2013 10:05:16 -0400 From: Tom Lane To: Frank van Vugt cc: Tomas Vondra , pgsql-bugs@postgresql.org, Valentine Gogichashvili Subject: Re: array_agg() on a set larger than some arbitrary(?) limit causes runaway memory usage and eventually memory exhaustion In-reply-to: <3014614.ujIC87ofob@techfox.foxi> References: <3839201.Nfa2RvcheX@techfox.foxi> <1615181.fDHOPIPOzk@techfox.foxi> <3014614.ujIC87ofob@techfox.foxi> Comments: In-reply-to Frank van Vugt message dated "Thu, 31 Oct 2013 08:08:52 +0100" Date: Thu, 31 Oct 2013 10:05:16 -0400 Message-ID: <22340.1383228316@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) 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 Frank van Vugt writes: > Op zondag 20 oktober 2013 12:57:43 schreef Tomas Vondra: >> Attached is a quick patch removing the local memory context and using >> aggcontext instead. > It looks like this didn't go into git yet. Will it be in v9.2.6/v9.3.1? Certainly not. We can consider it for 9.4, if Tomas submits it to the commitfest process, but it needs review and testing. In particular I'm skeptical that it probably outright breaks some cases (look at makeMdArrayResult) and results in substantial added bloat, not savings, in others. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs