[postgis-devel] [PostGIS] #851: [raster] Numerous ST_Value query cause the memory to grow indefinitely

Sandro Santilli strk at keybit.net
Thu Apr 21 14:07:48 PDT 2011

On Thu, Apr 21, 2011 at 07:49:57PM -0000, PostGIS wrote:

>  Conclusion: rt_context_destroy() is still very useful...

This is because currently rt_context is allocated in upper memory context
but not reused (the static variable always re-assigned).

Dropping the MemoryContextSwitch should reclaim it at end of function.
Properly using the static should allocate one for the whole backend lifetime.


  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html

More information about the postgis-devel mailing list