Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 494211E9AFAD for ; Mon, 12 Dec 2011 04:29:58 -0400 (AST) Received: from exprod7og122.obsmtp.com ([64.18.2.22]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ra1Gk-0001mZ-DX for pgsql-bugs@postgresql.org; Mon, 12 Dec 2011 08:29:58 +0000 Received: from mail-ey0-f171.google.com ([209.85.215.171]) (using TLSv1) by exprod7ob122.postini.com ([64.18.6.12]) with SMTP ID DSNKTuW7cypg5fHCF9/14M4iuasuGKQau0k3@postini.com; Mon, 12 Dec 2011 00:29:54 PST Received: by eaa1 with SMTP id 1so783387eaa.2 for ; Mon, 12 Dec 2011 00:29:38 -0800 (PST) Received: by 10.213.110.12 with SMTP id l12mr1796444ebp.85.1323678578548; Mon, 12 Dec 2011 00:29:38 -0800 (PST) Received: from [192.168.1.101] (dsl-hkibrasgw2-ff6cc300-200.dhcp.inet.fi. [88.195.108.200]) by mx.google.com with ESMTPS id 39sm7408774eei.1.2011.12.12.00.29.37 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Dec 2011 00:29:37 -0800 (PST) Message-ID: <4EE5BB70.4090903@enterprisedb.com> Date: Mon, 12 Dec 2011 10:29:36 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.2.24) Gecko/20111114 Icedove/3.1.16 MIME-Version: 1.0 To: Tom Lane CC: Andres Freund , pgsql-bugs@postgresql.org, Jochen Erwied Subject: Re: Postgresql 9.1.2 - abnormal memory usage References: <396904450.20111211221529@erwied.eu> <201112120045.23211.andres@anarazel.de> <201112120145.42463.andres@anarazel.de> <27575.1323671190@sss.pgh.pa.us> In-Reply-To: <27575.1323671190@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201112/77 X-Sequence-Number: 31888 On 12.12.2011 08:26, Tom Lane wrote: > Andres Freund writes: >> In 3b8161723c645853021b57330dd2ea0484ec6131 Heikki made DatumGetInetP unpack >> toasted values. Unfortunately the btree support functions for the inet type >> didn't free memory which they have to do in contrast to about everything else. > >> I fixed a few more functions than strictly necessary but I guess thats ok. > > Seems like the correct fix is to revert these functions to the former > behavior, ie they should be using the PP macros not the unpacking ones. Agreed, there's no need to unpack here. Fixed, thanks for the report! -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com