[postgis-tickets] [PostGIS] #4720: Memory leak when using Geography

PostGIS trac at osgeo.org
Fri Aug 28 05:40:21 PDT 2020


#4720: Memory leak when using Geography
----------------------+------------------------------
  Reporter:  kthujvu  |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  medium   |  Milestone:  PostGIS 3.0.3
 Component:  postgis  |    Version:  3.0.x
Resolution:           |   Keywords:  geography memory
----------------------+------------------------------

Comment (by Algunenano):

 I can reproduce it with the 110m query when loading the data from the shp
 as a geography.

 The setup operation (to create the points relation) takes ~5 MB and
 mantains the memory stable, so the issue comes from the last JOIN.

 Since the only way I know to leak memory from Postgis is in indexes (since
 those don't work with the same Memory context limits) I tried the same
 query disabling indexscan (`set enable_indexscan = false;`) and with that
 the issue does not appear.

 I've had a look at the offending function
 (`gserialized_gist_geog_distance`) but I haven't seen anywhere were a leak
 might happen, so I don't really know if it's the index leaking memory or
 the function finishing faster and caching some results. It needs a more in
 depth investigation.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4720#comment:4>
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