[postgis-tickets] [PostGIS] #2385: ST_MakeLine causing out of memory error

PostGIS trac at osgeo.org
Wed Jul 17 15:34:50 PDT 2013


#2385: ST_MakeLine causing out of memory error
------------------------------------------+---------------------------------
 Reporter:  ris                           |       Owner:  pramsey
     Type:  defect                        |      Status:  new    
 Priority:  medium                        |   Milestone:         
Component:  postgis                       |     Version:  2.0.x  
 Keywords:  ST_MakeLine memory aggregate  |  
------------------------------------------+---------------------------------
 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 at wrigleys.postgresql.org]

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2385>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list