From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Matt Magoffin" <postgresql(dot)org(at)msqr(dot)us> |
Cc: | "Kris Jurka" <books(at)ejurka(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Memory use in 8.3 plpgsql with heavy use of xpath() |
Date: | 2008-07-03 00:06:31 |
Message-ID: | 18707.1215043591@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Matt Magoffin" <postgresql(dot)org(at)msqr(dot)us> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-07-03 00:10:32 | Re: Memory use in 8.3 plpgsql with heavy use of xpath() |
Previous Message | Fernando Dominguez | 2008-07-02 23:30:48 | pg_ctl start check sum failed |