id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 2385,ST_MakeLine causing out of memory error,ris,pramsey,"The following snippet: {{{ SELECT ST_MakeLine ( ST_Point ( a , b ) ) FROM generate_series ( 1 , 1000000 ) AS a , generate_series ( 1 , 10 ) AS b GROUP BY a; }}} uses a huge amount of memory. This has been tested on Debian postgres 9.1.9-1/postgis 1.5.3-2 and also MacOS with postgres 9.2/postgis 2.0. If you don't have massive amounts of memory this will continue until it fails with {{{ ERROR: out of memory DETAIL: Failed on request of size 28. }}} but not before filling the log with thousands of lines the likes of {{{ accumArrayResult: 8192 total in 1 blocks; 7400 free (0 chunks); 792 used }}} along with a lot more diagnostic output I won't include here unless you want it as I'm 100% sure you'll be able to reproduce this. On the surface this looks a lot like [http://www.postgresql.org/message-id/E1Sgmoz-0002gU-No@wrigleys.postgresql.org]",defect,closed,medium,PostGIS Fund Me,postgis,2.0.x,invalid,ST_MakeLine memory aggregate,