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

Revised xml memory allocation patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-patches(at)postgreSQL(dot)org
Subject: Revised xml memory allocation patch
Date: 2008-01-15 01:55:29
Message-ID: 10561.1200362129@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
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


Attachment: xml-mem-4.patch
Description: application/octet-stream (15.8 KB)

Responses

pgsql-patches by date

Next:From: Bruce MomjianDate: 2008-01-15 03:24:06
Subject: Re: SSL over Unix-domain sockets
Previous:From: Tom LaneDate: 2008-01-14 22:20:54
Subject: Re: SSL over Unix-domain sockets

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