Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UjrCn-0000lm-TO for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Jun 2013 13:23:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UjrCn-0006Oz-D9 for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Jun 2013 13:23:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UjrCm-0006Os-Se for pgsql-bugs@postgresql.org; Tue, 04 Jun 2013 13:23:16 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UjrCd-0001by-Lr for pgsql-bugs@postgresql.org; Tue, 04 Jun 2013 13:23:15 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id E735928CC7; Tue, 4 Jun 2013 06:23:03 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id E4024B0B08; Tue, 4 Jun 2013 06:23:03 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 3153D12000A; Tue, 4 Jun 2013 06:28:44 -0700 (PDT) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA; Tue, 4 Jun 2013 06:28:42 -0700 (PDT) Message-ID: <51ADEA34.4080704@vmware.com> Date: Tue, 04 Jun 2013 16:23:00 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Stephen Frost CC: Naoya Anzai , pgsql-bugs@postgresql.org, Akio Iwaasa Subject: Re: Memory-leak in BackgroundWriter(and Checkpointer) References: <20130604122736.GH5871@tamriel.snowman.net> In-Reply-To: <20130604122736.GH5871@tamriel.snowman.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -7.4 (-------) 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 On 04.06.2013 15:27, Stephen Frost wrote: > * Naoya Anzai (anzai-naoya@mxu.nes.nec.co.jp) wrote: >> I've found a memory-leak bug in PostgreSQL 9.1.9's background >> writer process. > > This looks legit, but probably not the right approach to fixing it. > Looks like it'd be better to work out a way to use a static variable to > reuse the same memory, ala what GetRunningTransactionData() does, and > avoid having to do allocation while holding all the locks (or at least, > not very often). I can't get too excited about the overhead of a single palloc here. It's a fairly heavy operation anyway, and only runs once per checkpoint. And we haven't heard any actual complaints of latency hiccups with wal_level=hot_standby. - Heikki -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs