Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UjqL7-0006Io-9s for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Jun 2013 12:27:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UjqL6-0001AM-Mh for pgsql-bugs@arkaria.postgresql.org; Tue, 04 Jun 2013 12:27:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UjqL5-0001AG-QI for pgsql-bugs@postgresql.org; Tue, 04 Jun 2013 12:27:47 +0000 Received: from cl-262.qas-01.us.sixxs.net ([2001:4830:1600:105::2] helo=tamriel.snowman.net) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UjqKx-0000YH-M6 for pgsql-bugs@postgresql.org; Tue, 04 Jun 2013 12:27:47 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 1ECAF222E7; Tue, 4 Jun 2013 08:27:37 -0400 (EDT) Date: Tue, 4 Jun 2013 08:27:36 -0400 From: Stephen Frost To: Naoya Anzai Cc: pgsql-bugs@postgresql.org, Akio Iwaasa Subject: Re: Memory-leak in BackgroundWriter(and Checkpointer) Message-ID: <20130604122736.GH5871@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZPDwMsyfds7q4mrK" Content-Disposition: inline In-Reply-To: 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: 08:20:25 up 1 day, 11:59, 4 users, load average: 0.06, 0.05, 0.06 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) 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 --ZPDwMsyfds7q4mrK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Naoya Anzai (anzai-naoya@mxu.nes.nec.co.jp) wrote: > I've found a memory-leak bug in PostgreSQL 9.1.9's background=20 > 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). Thanks, Stephen --ZPDwMsyfds7q4mrK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlGt3TgACgkQrzgMPqB3kijS3ACdHDt201rjlG5SRmRdSCW8GcrB 8ZIAn15NIwGtxaHsyz2xucgNksmpHAoL =8Mrl -----END PGP SIGNATURE----- --ZPDwMsyfds7q4mrK--