<html><body bgcolor="#FFFFFF"><div>The problem is you are collecting the whole table into memory before running the hull operation. There is just an upper limit to the size of tables you can use that trick on. The solution, says the software developer, is smarter software, like a convex hull aggregate that builds the hull progressively, instead if having to first collect all the inputs.<br><br>P.</div><div><br>On 2011-07-26, at 2:44 AM, Paul & Caroline Lewis <<a href="mailto:paulcaz80@hotmail.com">paulcaz80@hotmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><div dir="ltr">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
<div dir="ltr">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
<div dir="ltr">
Hi All,<br> The following error has me lost as to finding the solution:<br> <br>*****************************************************************************<br>ERROR: array size exceeds the maximum allowed (1073741823)<br>---------- Error----------------<br>ERROR: array size exceeds the maximum allowed (1073741823)<br>SQL state: 54000<br>*****************************************************************************<br> <br>It happened when using this SQL:<br> <br>*****************************************************************************<br>SELECT ST_ConvexHull(ST_Collect(ST_Force_2D(geom))) FROM table001<br>*****************************************************************************<br>This table has 62 million 3D point geometry records, which is one of the small tables I want to use this function on. <br>While the server we are running is quite powerful (32GB RAM), we have edited a lot of system/DB memory settings but I cannot trace any changes we made to the array size mentioned in the error.<br>It also seems this query is very similar to this thread:<br> <br><a href="http://postgis.refractions.net/pipermail/postgis-users/2010-March/026215.html" target="_blank"><font color="#0068cf">http://postgis.refractions.net/pipermail/postgis-users/2010-March/026215.html</font></a><br> <br>However, I cannot ascertain if a solution was found in this thread and was wondering if anyone has seen this problem.<br>The error's array size is 1GB I believe (if the number is bytes) but we have not changed any settings that reference 1GB, does anyone know where this array limit error is coming from. I have a similar system to that mentioned in the thread above but for a Postgresql 9 install. The DB is fine other than this error where more complex bounding box queries on the 3D geoms are working.<br> <br>Any help/info would be much appreciated.<br> <br>Paul <br></div>
</div>
</div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>postgis-users mailing list</span><br><span><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a></span><br><span><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a></span><br></div></blockquote></body></html>