DBD::Pg list dead?
am 03.08.2007 10:30:11 von mariusauto-dbiMy apologies for bringing this here, but I've tried to contribute a
bugfix (memory leak) to DBD::Pg on a couple of DBD::Pg related lists
(first to Dbdpg-general, which tells me to post to dbd-pg@perl.org,
which seems dead anyway since there are no posts there at all).
Could anybody point me to the right direction for patches to DBD::Pg, or
possibly pick up the bugfix from here and get it into CVS or similar so
I can avoid having to patch the sources at every release (assuming the
patch seems ok)?
Thanks,
Marius Kjeldahl
Subj.: DBD::Pg 1.49 blobs and memory leakage
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;
}