Skip site navigation (1) Skip section navigation (2)

Re: libxml incompatibility

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: David Lee Lambert <davidl(at)lmert(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: libxml incompatibility
Date: 2009-03-10 20:14:24
Message-ID: 2983.1236716064@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> David Lee Lambert wrote:
>> Is it supposed to be OK to call xmlCheckVersion() more than once?

> You are certainly not supposed to call xmlInitParser more than once - 
> see <http://xmlsoft.org/html/libxml-parser.html#xmlInitParser>

No, what that says is that it can't be called concurrently by more
than one thread.  If there were such a restriction then our own code
wouldn't work at all, because we call it every time through xml_parse()
or xpath().

> Even if this were fixed, however, I'm still not convinced that we'll be 
> able to call libxml2 from perl after we've installed our memory handler 
> (xml_palloc).

Yeah, I'm wondering about that too.  It certainly wouldn't have the
behavior that perl is expecting.

We could possibly use xmlMemGet() to fetch the prior settings and then
restore them after we are done, but making sure that happens after an
error would be a bit tricky.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2009-03-10 20:39:59
Subject: Re: parallel restore fixes
Previous:From: Alvaro HerreraDate: 2009-03-10 20:06:07
Subject: Re: problem inserting in GIN index

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group