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

Re: remove contrib/xml2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: M Z <jm80008(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: remove contrib/xml2
Date: 2010-02-18 15:38:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Then if you look at xpath.c in contrib/xml2 you notice that it's doing
> exactly the thing that the core module says it's unreliable: using
> palloc and friends in xmlMemSetup.  So to fix the bug what's needed is
> that the xmlMemSetup call in contrib is removed altogether, and all
> memory is tracked and released by hand.  It's rather tedious, and it's
> also difficult to plug all resulting memory leaks.  But AFAIUI doing
> that would fix (some of?) the crashes.  Not sure if your crash is in
> this category.

FWIW, the core xml code seems to have been pretty stable since we gave
up on trying to redirect libxml's memory allocations to palloc.
So what you basically need to do to xpath.c is something like this:

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Dimitri FontaineDate: 2010-02-18 15:52:48
Subject: Re: remove contrib/xml2
Previous:From: Bruce MomjianDate: 2010-02-18 15:30:46
Subject: Re: A thought: should we run pgindent now?

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