[postgis-users] Array Size Error

Paul Ramsey pramsey at cleverelephant.ca
Tue Jul 26 10:44:25 PDT 2011


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.

P.

On 2011-07-26, at 2:44 AM, Paul & Caroline Lewis <paulcaz80 at hotmail.com> wrote:

> Hi All,
> The following error has me lost as to finding the solution:
> 
> *****************************************************************************
> ERROR: array size exceeds the maximum allowed (1073741823)
> ---------- Error----------------
> ERROR: array size exceeds the maximum allowed (1073741823)
> SQL state: 54000
> *****************************************************************************
> 
> It happened when using this SQL:
> 
> *****************************************************************************
> SELECT ST_ConvexHull(ST_Collect(ST_Force_2D(geom))) FROM table001
> *****************************************************************************
> This table has 62 million 3D point geometry records, which is one of the small tables I want to use this function on. 
> 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.
> It also seems this query is very similar to this thread:
> 
> http://postgis.refractions.net/pipermail/postgis-users/2010-March/026215.html
> 
> However, I cannot ascertain if a solution was found in this thread and was wondering if anyone has seen this problem.
> 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.
> 
> Any help/info would be much appreciated.
> 
> Paul 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110726/49791bd4/attachment.html>


More information about the postgis-users mailing list