Search Postgresql Archives

Re: Memory use in 8.3 plpgsql with heavy use of xpath()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Matt Magoffin" <postgresql.org@xxxxxxx> writes:
>>> I think this should fix it.
>>> Kris Jurka

Confirmed, that makes it go away nicely here:

  LibxmlContext: 57344 total in 3 blocks; 55720 free (202 chunks); 1624 used

>> It looks like xml.c source has changed considerably since 8.3 (looking at
>> revision 1.68.2.2 from the 8.3.3. release). Do you know where/if this
>> patch would apply to the 8.3 branch?

Here's what I just committed to the 8.3 branch:

Index: xml.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/adt/xml.c,v
retrieving revision 1.68.2.2
diff -c -r1.68.2.2 xml.c
*** xml.c	24 Mar 2008 19:12:58 -0000	1.68.2.2
--- xml.c	2 Jul 2008 23:57:20 -0000
***************
*** 3201,3206 ****
--- 3201,3207 ----
  		result = (text *) palloc(len + VARHDRSZ);
  		SET_VARSIZE(result, len + VARHDRSZ);
  		memcpy(VARDATA(result), str, len);
+ 		xmlFree(str);
  	}
  
  	return result;


			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux