Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VdLPL-0007xa-5l for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Nov 2013 14:45:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VdLPK-0004U4-Kz for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Nov 2013 14:45:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VdLPJ-0004Sl-A3 for pgsql-hackers@postgresql.org; Mon, 04 Nov 2013 14:45:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VdLPG-0007kt-FC for pgsql-hackers@postgresql.org; Mon, 04 Nov 2013 14:45:33 +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 rA4EjMef011269; Mon, 4 Nov 2013 09:45:22 -0500 From: Tom Lane To: Andres Freund cc: Jim Nasby , g.vanluffelen@qipc.com, pgsql-hackers@postgresql.org Subject: Re: [BUGS] BUG #8573: int4range memory consumption In-reply-to: <20131104101221.GJ3567@awork2.anarazel.de> References: <18832.1383332908@sss.pgh.pa.us> <12646.1383420576@sss.pgh.pa.us> <20131104101221.GJ3567@awork2.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 04 Nov 2013 11:12:21 +0100" Date: Mon, 04 Nov 2013 09:45:22 -0500 Message-ID: <11268.1383576322@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > On 2013-11-02 15:29:36 -0400, Tom Lane wrote: >> Attached is a proposed patch for this. It fixes most of the functions >> in printtup.c to use a per-row memory context. (I did not bother to >> fix debugtup(), which is used only in standalone mode. If you're doing >> queries large enough for mem leaks to be problematic in standalone mode, >> you're nuts.) > FWIW, by that definition I have been nuts several time in the past - > without much choice since I was recovering data from a corrupted cluster > and the database couldn't be started normally. This now has gotten worse > (even in the backbranches) since debugtup won't clean up detoasted data > anymore. > But I guess the solution for that is to use COPY in those situations > which shouldn't have that problem and should work. Also, easier to parse ;) Considering the output from debugtup goes to stdout where it will be intermixed with prompts etc, I'd have to think that COPY is a way better solution for dealing with bulk data. Really I'd like to see standalone mode, in its current form, go away completely. I had a prototype patch for allowing psql and other clients to interface to a standalone backend. I think getting that finished would be a way more productive use of time than improving debugtup. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers