[postgis-devel] [PostGIS] #547: ST_contains memory problem when used between polygon and mixed geometry

PostGIS trac at osgeo.org
Mon May 2 17:34:43 PDT 2011


#547: ST_contains memory problem when used between polygon and mixed geometry
--------------------------------+-------------------------------------------
 Reporter:  twain               |       Owner:  pramsey      
     Type:  defect              |      Status:  new          
 Priority:  high                |   Milestone:  PostGIS 1.5.3
Component:  postgis             |     Version:  1.5.X        
 Keywords:  ST_contains memory  |  
--------------------------------+-------------------------------------------

Comment(by chodgson):

 I don't have a test case for this, but I think it's clear that this patch
 should be applied. Without it, we're just leaking the cache objects
 whenever we encounter a different type of query.

 Ideally, we could be even smarter, and either fit both cache objects into
 fn_extra (perhaps with a super-cache struct) or, make our processing
 dependent on what object with have cached. eg. If we are doing a point in
 poly, and we already have a geos struct, use geos instead of the postgis
 PIP code. So in the case of mixed geometry types, we would "upgrade" from
 the rtree cache to the prepared geos cache, but not downgrade (as this
 patch would do) - this only makes sense to do if the geos PIP using a
 prepared geom is comparable in speed to the builtin postgis PIP code
 (which I would think it should be?). Holding on to both cache objects
 should be pretty easy to do though.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/547#comment:3>
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-devel mailing list