[postgis-devel] lwgeom_release WTF

strk strk at keybit.net
Thu Sep 25 23:33:34 PDT 2008


On Thu, Sep 25, 2008 at 01:45:59PM -0700, Paul Ramsey wrote:
> Found in lwgeo:
> 
> TODO:
> "- lwgeom_clone_deep / lwgeom_release_deep
>   (or maybe should both be always be deep.... )"
> 
> Ya think?!?!?
> 
> It looks like many of our problems have been caused by people treating
> lwgeom_release as if it, er, releases all the memory under the
> structure! But, in fact, it doesn't release the bits that USE THE MOST
> MEMORY, like the point lists, it just leaves 'em hanging high.

Right. This is basically a memory optimization as most of the times
(when under postgres umbrella) the actual BIG THINGS are kept serialized
in the detoasted datum, so would get released by postgres pools.

The plan for release_deep/clone_deep was for extra-postgres use
(standalone liblwgeom).

--strk;



More information about the postgis-devel mailing list