Обсуждение: Revised xml memory allocation patch

Поиск
Список
Период
Сортировка

Revised xml memory allocation patch

От
Tom Lane
Дата:
Attached is my revision of Alvaro's patch to change xml.c so that libxml
memory allocations happen in a specially designated context.  I find
this more convincing than the existing technique of using whatever
context xml.c happens to be called in.  It should also be marginally
faster because (barring errors) we only need to reset libxml once per
transaction not once per xml.c function call.  On the other hand it's
kind of late in the beta cycle to be changing anything so low-level,
and as of today I cannot point to any specific bug it would fix.

Any thoughts whether to apply or not?

Note: the patch removes most of the PG_TRY blocks in xml.c.  For ease of
reading I did not reindent the contained code, but will do so before
applying, if we choose to apply.

            regards, tom lane


Вложения

Re: Revised xml memory allocation patch

От
Neil Conway
Дата:
On Mon, 2008-01-14 at 20:55 -0500, Tom Lane wrote:
> Any thoughts whether to apply or not?

Seems like a much more sane approach to me -- +1.

-Neil



Re: Revised xml memory allocation patch

От
"Jonah H. Harris"
Дата:
On Jan 15, 2008 5:04 AM, Neil Conway <neilc@samurai.com> wrote:
> > Any thoughts whether to apply or not?
>
> Seems like a much more sane approach to me -- +1.

Agreed, sounds and looks better to me.  +1

--
Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324
EnterpriseDB Corporation                | fax: 732.331.1301
499 Thornall Street, 2nd Floor          | jonah.harris@enterprisedb.com
Edison, NJ 08837                        | http://www.enterprisedb.com/