[postgis-devel] lwgeom_release WTF

Paul Ramsey pramsey at cleverelephant.ca
Fri Sep 26 08:10:37 PDT 2008


I think I'm going to implement the deep free. As you note, under
postgres the leak is invisible, but when we do the memory context swap
it becomes visible, at least during statement execution.

P.

On Thu, Sep 25, 2008 at 11:33 PM, strk <strk at keybit.net> wrote:
> 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;
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>



More information about the postgis-devel mailing list