From: Tomas Vondra <tv@fuzzy.cz>
To: pgsql-bugs@postgresql.org
Subject: Re: memory leak in xml2 contrib module
Date: Tue, 14 Dec 2010 21:57:31 +0100
Message-ID: <4D07DA3B.3070402@fuzzy.cz> (raw)
In-Reply-To: <AANLkTi=1sG8=UuAUyD-8LoyDNZYXOdcNfn2NMsmGV7G_@mail.gmail.com>
References: <d7a03755ddcb11e5ffca891bbf7aa33d.squirrel@sq.gransy.com>
<AANLkTi=1sG8=UuAUyD-8LoyDNZYXOdcNfn2NMsmGV7G_@mail.gmail.com>
Dne 14.12.2010 21:50, Robert Haas napsal(a):
> On Fri, Nov 26, 2010 at 7:54 AM, <tv@fuzzy.cz> wrote:
>> one of my colleagues found ugly memory leak in the xml2 contrib module.
>> Try this:
>>
>> select xpath_number('<data>' || generate_series || '</data>','/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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tv@fuzzy.cz
Subject: Re: memory leak in xml2 contrib module
In-Reply-To: <4D07DA3B.3070402@fuzzy.cz>
References: <d7a03755ddcb11e5ffca891bbf7aa33d.squirrel@sq.gransy.com> <AANLkTi=1sG8=UuAUyD-8LoyDNZYXOdcNfn2NMsmGV7G_@mail.gmail.com> <4D07DA3B.3070402@fuzzy.cz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox