<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1027" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>We are using postgresql 9.1.4 with postgis 1.5.5 and have been having problems with what looks like memory leaks. Running a query with st_intersects in the where clause causes the memory and swap on the server to be depleted ending up with the postgres process running the query being killed.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Took me a while to find a solution but it looks like one you already knew about, or at least I hope it is the right solution.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><a href="http://trac.osgeo.org/postgis/ticket/547">http://trac.osgeo.org/postgis/ticket/547</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><a href="http://trac.osgeo.org/postgis/browser/trunk/postgis/lwgeom_cache.c?rev=9136">http://trac.osgeo.org/postgis/browser/trunk/postgis/lwgeom_cache.c?rev=9136</a><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So I added the missing line to the GetGeomCache function in lwgeom_cache.c and all appears to be working fine now.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>My question is, if this was known about as far back as 1.5.1, why is it not in the 1.5.5 release? Was it removed because it caused other problems that I will come across shortly? I am hoping it should be there and I won’t end up with more problems.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Can anyone advise me on what happened with this bug?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks in advance,<o:p></o:p></p><p class=MsoNormal>Darren<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div><!--qsdbegin-->
<p> </p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>Infoterra Ltd. </span><span style='font-size:7.5pt;font-family:
"Arial","sans-serif";color:black'>Is part of the Astrium GEO-Information Services Division and a wholly owned subsidiary of Astrium, Europe's leading space systems and services specialist.<br>
<br>
</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>Disclaimer. </span><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
color:#666666'>The information contained in this e-mail and its attachments are
confidential and intended only for the use of the named addressee(s). If you
are not the intended addressee, please do not read, copy, use or disclose this
message or its attachments. If you have received this message in error, please
notify the sender immediately and delete or destroy all copies of this message
and attachments in all media. Any views or opinions expressed are solely those
of the author and do not necessarily represent those of Infoterra Ltd and shall
not form part of any binding agreement.<br>
<br>
Infoterra Limited a company registered in <st1:country-region w:st="on"><st1:place
 w:st="on">England</st1:place></st1:country-region> under number 2359955 and
having its registered office at Atlas House, <st1:address w:st="on"><st1:Street
 w:st="on">41 Wembley Road</st1:Street>, <st1:City w:st="on">Leicester</st1:City>,
 <st1:PostalCode w:st="on">LE3 1UT</st1:PostalCode></st1:address>. VAT number
GB 476 0468 27. <br>
<br>
</span><span style='font-size:10.0pt;font-family:Webdings;color:#009900'>P </span><span
style='font-size:7.5pt;font-family:"Tahoma","sans-serif";color:#009900'>Before
printing, think about the environment </span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<!--qsdend--><br></body></html>