On 31.03.2011 12:30, Jan Urbański wrote:
> On 31/03/11 07:35, Heikki Linnakangas wrote:
>> On 30.03.2011 21:21, Jan Urbański wrote:
>>> Valgrind showed me the way. PFA a trivial patch to avoid leaking a
>>> PLyProcedure struct in inline blocks.
>> Hmm, any reason the PLyProcedure struct needs to be allocated in
>> TopMemoryContext in the first place? Could you palloc0 it in a
>> shorter-lived context, or even better, just allocate it in stack?
> Yeah, you're right, you can keep it on the stack.
>> PS. I don't think the volatile qualifier in 'proc' is in necessary. The
>> variable is not changed in PG_TRY-block.
> That always confuses me, but I guess you're right, the variable does not
> change, only the memory it points to.
Ok then, committed.
In response to
pgsql-hackers by date
|Next:||From: Noah Misch||Date: 2011-03-31 10:06:49|
|Subject: Re: BUG #5856: pg_attribute.attinhcount is not correct.|
|Previous:||From: Jan Urbański||Date: 2011-03-31 09:30:29|
|Subject: Re: Re: [COMMITTERS] pgsql: Fix plpgsql to release SPI
plans when a function or DO block is|
pgsql-committers by date
|Next:||From: Heikki Linnakangas||Date: 2011-03-31 10:41:35|
|Subject: pgsql: Increase SHMEM_INDEX_SIZE from 32 to 64. We're currently at 40e|
|Previous:||From: Heikki Linnakangas||Date: 2011-03-31 09:43:01|
|Subject: pgsql: Don't leak the temporary PLyProcedure struct we create forinlin|