Re: Memory leaks when fetching array columns
Lamprecht <[email protected]> Sat, 08 Nov 2014 10:09:46 +0100
| Newsgroups | gmane.comp.db.postgresql.dbdpg |
|---|---|
| Message-ID | <[email protected]> |
Am 07.11.2014 um 16:10 schrieb Lamprecht:
> Am 04.11.2014 um 16:32 schrieb Greg Sabino Mullane:
>
>> I verified that the problem is in that block by setting:
>>
>> $dbh->{pg_expand_array} = 0;
>>
>> If that is set, no leak is seen in the test case.
>>
>>
>
>
> I tried to reproduce with Ubuntu 14.04 / perl 5.18.2 / PG 9.3.5
> DBD::Pg 3.4.2
>
> I set $dbh->{pg_expand_array} = 0;
>
> No matter if I select the text or the array column, I still get an inc of 1 SV
> per round.
> But what makes it much worse is a growth of process memory: It increases by 0.4
> MB each round. I doubt that this is all lost in the one SV that D::L reports...
The memory growth is caused by Devel::Leak, so please ignore.
When I move the prepare out of the the loop so the statement gets prepared only
once, the SV count is constant.
Christoph