Grokbase Groups Perl dbd-pg July 2007
FAQ
I've been using DBD::Pg for a system I have made which makes use of
large blobs stored in PostgreSQL databases. Very soon it became very
clear that this leads to massive memory leakage. I traced it down to
DBD::Pg and found an unofficial patch that solved the problem some time ago.

As far as I can see this problem still persists in the recent DBD::Pg
sources, so I figured I would try to submit the fix here hoping that it
would get included in the official sources.

As you can see from the attached diff it merely comments out a couple of
allocations, which probably shouldn't be there. Please note that I am
not the original author that figured this out, I've just been using this
patch on production servers which then work without any leakage.

Please also note that the version referenced as "1.50" in the diff is
just my local modified version.

Thanks,

Marius K.

--- DBD-Pg-1.49/quote.c 2006-04-20 22:55:55.000000000 +0200
+++ DBD-Pg-1.50/quote.c 2006-12-29 06:09:39.000000000 +0100
@@ -305,7 +305,7 @@
if (NULL == string)
return;

- New(0, result, strlen((char *)string)+1, unsigned char);
+ /*New(0, result, strlen((char *)string)+1, unsigned char);*/

result = string;

@@ -334,7 +334,7 @@
}
}
result = '\0';
- Renew(result, (*retlen), unsigned char);
+ /*Renew(result, (*retlen), unsigned char);*/
string = result - (*retlen);
return;
}

Search Discussions

  • Greg Sabino Mullane at Jul 30, 2007 at 5:08 pm

    As far as I can see this problem still persists in the recent DBD::Pg
    sources, so I figured I would try to submit the fix here hoping that it
    would get included in the official sources.
    Already applied in revision 8336, but thanks for the report, and rest
    assured this will be in the next version of DBD::Pg.

    - --
    Greg Sabino Mullane greg@turnstep.com
    End Point Corporation
    PGP Key: 0x14964AC8 200707301308
    http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdbd-pg @
categoriesperl
postedJul 30, '07 at 11:37a
activeJul 30, '07 at 5:08p
posts2
users2
websiteperl.org

People

Translate

site design / logo © 2022 Grokbase