X-Original-To: pgsql-patches-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D83899FB2B5 for ; Wed, 2 Aug 2006 11:42:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 57681-10 for ; Wed, 2 Aug 2006 11:42:10 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from joeconway.com (joeconway.com [68.15.9.201]) by postgresql.org (Postfix) with ESMTP id 282B99FB256 for ; Wed, 2 Aug 2006 11:42:10 -0300 (ADT) Received: from [192.168.4.40] (account jconway [192.168.4.40] verified) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 4138932; Wed, 02 Aug 2006 07:42:09 -0700 Message-ID: <44D0B9C1.2020608@joeconway.com> Date: Wed, 02 Aug 2006 07:42:09 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc5 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane CC: pgsql-patches@postgreSQL.org Subject: Re: Values list-of-targetlists patch for comments (was Re: References: <44B69778.5050104@dunslane.net> <50461.84.63.113.55.1152832991.squirrel@pezone.net> <44B7ADFC.90205@dunslane.net> <44D03D9F.80203@joeconway.com> <15263.1154526181@sss.pgh.pa.us> <44D0AF87.2030304@joeconway.com> <16892.1154528708@sss.pgh.pa.us> In-Reply-To: <16892.1154528708@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.016 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/56 X-Sequence-Number: 20572 Tom Lane wrote: > > I wonder whether there is any reasonable way to determine which data > structures are responsible for how much space ... in my test I'm seeing > > MessageContext: 822075440 total in 104 blocks; 4510280 free (1 chunks); 817565160 used > ExecutorState: 8024624 total in 3 blocks; 20592 free (12 chunks); 8004032 used > > so it seems mostly not the executor's fault, but that's not much to go > on. I was doing it by sprinkling MemoryContextStats() in various places. I'll spend some time again later today and see if I can narrow it down to specific data structures using that. It shouldn't be too hard -- the patch I sent last night only pfrees a few structures, and they represent the bulk of what we need to clean up. Joe