Re: BUG #16112: large, unexpected memory consumption

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, ben(at)lantern(dot)is, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16112: large, unexpected memory consumption
Date: 2019-11-13 17:21:47
Message-ID: 368.1573665707@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2019-11-13 15:50:04 +0100, Tomas Vondra wrote:
>> The attached trivial patch fixes that by adding a pfree() at the end of
>> the function.

> Hm. That's clearly an improvement. But I'm not quite sure it's really
> the right direction. It seems like a bad idea to rely on
> ExecMakeTableFunctionResult() otherwise never leaking any memory.

Considering that ExecMakeTableFunctionResult went from zero pallocs
to one, I don't see a strong reason why it should have bothered with
a private memory context before, nor do I think that's a good
response now.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Vondra 2019-11-13 17:28:03 Re: BUG #16112: large, unexpected memory consumption
Previous Message Tom Lane 2019-11-13 17:18:13 Re: [BUG] Uninitializaed configOut.leafType used.