Received: from golem.jpl.nasa.gov (root@hectic-1.jpl.nasa.gov [128.149.68.203]) by hub.org (8.8.8/8.7.5) with ESMTP id JAA28828 for ; Thu, 9 Apr 1998 09:00:01 -0400 (EDT) Received: from alumni.caltech.edu (localhost [127.0.0.1]) by golem.jpl.nasa.gov (8.8.5/8.8.5) with ESMTP id NAA10607; Thu, 9 Apr 1998 13:00:25 GMT Sender: tgl@mythos.jpl.nasa.gov Message-ID: <352CC668.134F4FE7@alumni.caltech.edu> Date: Thu, 09 Apr 1998 13:00:24 +0000 From: "Thomas G. Lockhart" Organization: Caltech/JPL X-Mailer: Mozilla 4.03 [en] (X11; I; Linux 2.0.30 i686) MIME-Version: 1.0 To: Maurice Gittens CC: Massimo Dal Zotto , Pgsql Development , David Gould Subject: Re: [HACKERS] Everything leaks; How it mm suppose to work? References: <00d901bd63a6$a9bd0520$fcf3b2c2@caleb..gits.nl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > >Does it make sense to have a 'row' context which is released just > >before starting with a new tuple ? The total number or free is the > >same but they are distributed over the query and unused memory should > >not accumulate. > >I have seen backends growing to 40-60MB with queries which scan a > >very large number of rows. > I think this would be appropiate. It seems that the CPU overhead on all queries would increase trying to deallocate/reuse memory during the query. There are lots of places in the backend where memory is palloc'd and then left lying around after use; I had assumed it was sort-of-intentional to avoid having extra cleanup overhead during a query. - Tom