[postgis-devel] fix for memory leaks in shp2pgsql.c

Dave Fuhry dfuhry at gmail.com
Tue Oct 13 16:47:57 PDT 2009


You can get the smaller of the test files I used here:
http://reportallusa.com/tmp/natwatershedlow.zip

It's 325MB uncompressed.

-Dave


On Tue, Oct 13, 2009 at 7:31 PM, Chris Hodgson <chodgson at refractions.net> wrote:
> Paul, this fix looks like it is specifically for large multi-polygon
> collections, perhaps your original test cases didn't include such data? I do
> recall you reporting having fixed "all" the memory leak issues before, but
> if you didn't have any multi-polygons in your test data then I could see how
> this would have been missed.
>
> Chris
>
>
> Paul Ramsey wrote:
>>
>> Maybe I just dreamed about fixing it. Or maybe I fixed something
>> egregious and left behind something less noticeable in my use case.
>>
>> On Tue, Oct 13, 2009 at 4:11 PM, Dave Fuhry <dfuhry at gmail.com> wrote:
>>
>>>
>>> Paul,
>>>
>>>  1.4.0.
>>>
>>>  I originally hit the problem on 1.3.x, then patched 1.4.0, which
>>> I'm /pretty/ sure was exhibiting the problem.
>>>
>>>  It was easy to see in `top` that shp2pgsql was gorging on memory as
>>> execution continued, and the leak locations were revealed fairly
>>> clearly in `valgrind --leak-check=full`.  This work is all against
>>> polygons; my impression is that loading of points or linestrings is
>>> unaffected.
>>>
>>> -Dave
>>>
>>>
>>> On Tue, Oct 13, 2009 at 5:32 PM, Paul Ramsey <pramsey at cleverelephant.ca>
>>> wrote:
>>>
>>>>
>>>> Huh, what version is this against? I thought I had cleaned those out.
>>>>
>>>> P.
>>>>
>>>> On Tue, Oct 13, 2009 at 2:21 PM, Dave Fuhry <dfuhry at gmail.com> wrote:
>>>>
>>>>>
>>>>> This patch fixes memory leaks in shp2pgsql.c.
>>>>>
>>>>> Previously, loading a 1.5GB shapefile was running a 4GB machine out of
>>>>> memory.
>>>>>
>>>>> -Dave
>>>>>
>>>>> _______________________________________________
>>>>> postgis-devel mailing list
>>>>> postgis-devel at postgis.refractions.net
>>>>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>>>>>
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> postgis-devel mailing list
>>>> postgis-devel at postgis.refractions.net
>>>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>>>>
>>>>
>>>
>>> _______________________________________________
>>> postgis-devel mailing list
>>> postgis-devel at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>>>
>>>
>>
>> _______________________________________________
>> postgis-devel mailing list
>> postgis-devel at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>>
>
> _______________________________________________
> 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