Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 97B061337B84 for ; Tue, 14 Dec 2010 16:57:39 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 67909-05 for ; Tue, 14 Dec 2010 20:57:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.gransy.com (mail.gransy.com [82.208.29.194]) by mail.postgresql.org (Postfix) with ESMTP id 6027A1337B77 for ; Tue, 14 Dec 2010 16:57:32 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by mail.gransy.com (Postfix) with ESMTP id 17C072E5A037 for ; Tue, 14 Dec 2010 21:57:31 +0100 (CET) Received: from mail.gransy.com ([127.0.0.1]) by localhost (nathalia.gransy.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KAhSAJlXA9wz for ; Tue, 14 Dec 2010 21:57:31 +0100 (CET) Received: from [192.168.1.1] (ip-94-112-1-102.net.upcbroadband.cz [94.112.1.102]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.gransy.com (Postfix) with ESMTPSA id F35EF2E5A03B for ; Tue, 14 Dec 2010 21:57:30 +0100 (CET) Message-ID: <4D07DA3B.3070402@fuzzy.cz> Date: Tue, 14 Dec 2010 21:57:31 +0100 From: Tomas Vondra User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101211 Lightning/1.0b3pre Thunderbird/3.1.6 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: memory leak in xml2 contrib module References: In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201012/98 X-Sequence-Number: 28904 Dne 14.12.2010 21:50, Robert Haas napsal(a): > On Fri, Nov 26, 2010 at 7:54 AM, wrote: >> one of my colleagues found ugly memory leak in the xml2 contrib module. >> Try this: >> >> select xpath_number('' || generate_series || '','/data') from >> generate_series(1,500000); >> >> This will allocate arbitrary amount of memory, and it won't release it >> until the backend exits (user disconnects). We've found this in 8.4 and >> I've verified it's still present in 9.0.1. >> >> I know the xml2 module is deprecated and most of the functions was moved >> into core (and behave correctly) but xslt_process function was not and >> that's why xml2 module is used. >> >> Pavel Stehule already prepared a fix (see the attachment). > > I don't see a response to this email, but it looks like Tom did apply a fix. Yes, AFAIK there's a relevant discussion in the pgsql-hackers list. regards Tomas