Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcDUq-0000za-7H for pgsql-bugs@arkaria.postgresql.org; Fri, 01 Nov 2013 12:06:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VcDUp-000095-J7 for pgsql-bugs@arkaria.postgresql.org; Fri, 01 Nov 2013 12:06:35 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VcDUn-00008w-KN for pgsql-bugs@postgresql.org; Fri, 01 Nov 2013 12:06:33 +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 1VcDUh-0001Jg-4G for pgsql-bugs@postgresql.org; Fri, 01 Nov 2013 12:06:33 +0000 Received: from techfox.foxi (techfox.foxi [192.168.0.31]) by storagefox.foxi.nl (8.14.5/8.14.5) with ESMTP id rA1C6KFK008410; Fri, 1 Nov 2013 13:06:20 +0100 From: Frank van Vugt To: Tom Lane 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 Date: Fri, 01 Nov 2013 13:06:20 +0100 Message-ID: <7389794.JZAAPvMp9o@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: <22340.1383228316@sss.pgh.pa.us> References: <3839201.Nfa2RvcheX@techfox.foxi> <3014614.ujIC87ofob@techfox.foxi> <22340.1383228316@sss.pgh.pa.us> 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 Op donderdag 31 oktober 2013 10:05:16 schreef Tom Lane: > > 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, Clear, please mind the fact that Tomas did point out to me that it was an untested patch ;) However, although the example with which I ran into this issue was a bit contrived, the current behaviour of the array functions in terms of memory usage does seem to be a bit greedy. So at least it _looks_ like a good idea to want to do something about it, since triggering this issue in the real world doesn't seem that far-fetched... Tomas...., are you planning to (submit a patch)? -- 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