Skip site navigation (1) Skip section navigation (2)

Re: Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial
Date: 2010-01-05 19:23:15
Message-ID: 4B4391A3.2090203@kaltenbrunner.cc (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Tom Lane wrote:
> Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc> writes:
>> did that and it seems the problem is in the loop that does:
> 
>> foreach my $row (@$data)
>> {
> 
>>      # To construct fmgroids.h and fmgrtab.c, we need to inspect some
>>      # of the individual data fields.  Just splitting on whitespace
> 
> Huh.  It's weird that I don't see a leak in either 5.8.7 or 5.10.1,
> which are the two closest perl versions I have handy here.  I think
> this may be a platform-specific Perl bug.  Still, it would be nice
> to work around it if we can.

yeah it is probably some strange platform specific issue - however with 
some help from the IRC channel I came up with the following patch that
considerable reduces the memory bloat (but still needs ~55MB max) and 
allows the build to succeed.


> 
> I'm not nearly good enough in Perl to be sure about the semantics
> of this loop.  Is it possible that it's changing the global contents
> of the @$data structure, rather than just hacking a local copy of
> each row before pushing some values into @fmgr?

hmm it is leaking a constant amount of 240kbyte per loop iteration with 
the original code but yeah very weird issue...


Stefan

Attachment: gen_fmgrtab_workaround.patch
Description: text/x-patch (559 bytes)

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2010-01-05 19:31:43
Subject: Re: Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial
Previous:From: Peter EisentrautDate: 2010-01-05 19:21:16
Subject: Re: libpq naming on Win64

pgsql-committers by date

Next:From: Tom LaneDate: 2010-01-05 19:31:43
Subject: Re: Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial
Previous:From: Alvaro HerreraDate: 2010-01-05 19:04:05
Subject: Re: Re: [COMMITTERS] pgsql: Get rid of the need for manual maintenance of the initial

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group