Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UjrcC-0002Dz-D1 for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Jun 2013 13:49:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UjrcB-0004Ht-OX for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Jun 2013 13:49:31 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UjrcB-0004Ho-1o for pgsql-bugs@postgresql.org; Tue, 04 Jun 2013 13:49:31 +0000 Received: from cl-262.qas-01.us.sixxs.net ([2001:4830:1600:105::2] helo=tamriel.snowman.net) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ujrc8-0003c0-SO for pgsql-bugs@postgresql.org; Tue, 04 Jun 2013 13:49:30 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 56415222F4; Tue, 4 Jun 2013 09:49:27 -0400 (EDT) Date: Tue, 4 Jun 2013 09:49:27 -0400 From: Stephen Frost To: Andres Freund Cc: Heikki Linnakangas , Naoya Anzai , pgsql-bugs@postgresql.org, Akio Iwaasa Subject: Re: Memory-leak in BackgroundWriter(and Checkpointer) Message-ID: <20130604134927.GI5871@tamriel.snowman.net> References: <20130604122736.GH5871@tamriel.snowman.net> <51ADEA34.4080704@vmware.com> <20130604132758.GC2854@alap2.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Encpt1P6Mxii2VuT" Content-Disposition: inline In-Reply-To: <20130604132758.GC2854@alap2.anarazel.de> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.2.0-4-amd64 (x86_64) X-Uptime: 09:32:46 up 1 day, 13:11, 4 users, load average: 0.15, 0.13, 0.13 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: 0.8 (/) 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 --Encpt1P6Mxii2VuT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Andres Freund (andres@2ndquadrant.com) wrote: > On 2013-06-04 16:23:00 +0300, Heikki Linnakangas wrote: > > 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. Perhaps, but we don't always hear about things that we should- this long standing memory leak being one of them. > Seems more consistent with the rest of the code too. But anyway, I am > fine with fixing it either way. And this is really the other point- having LogStandbySnapshot() need to clean up after GetRunningTransactionLocks() but not GetRunningTransactionData() would strike me as very odd. Thanks, Stephen --Encpt1P6Mxii2VuT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlGt8GcACgkQrzgMPqB3kigvNQCfQCpK8N+sGIDrfjfSgferTIjB ij8An2usIpb93s3KHQVgejAoyCBEo6SD =5TgY -----END PGP SIGNATURE----- --Encpt1P6Mxii2VuT--