Re: BUG #15700: PG 10 vs. 11: Large increase in memory usage when selecting BYTEA data (maybe memory leak)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Matthias Otterbach <mo(at)otterbach(dot)eu>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15700: PG 10 vs. 11: Large increase in memory usage when selecting BYTEA data (maybe memory leak)
Date: 2019-03-18 22:03:40
Message-ID: 6061.1552946620@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:
> But are we actually prepared to assume that nothing ever leaks in
> receivers? That's, as far as I can tell, not a documented
> assumption.

There's a lot that's not documented there :-(

> We're also assuming that we don't leak into MessageContext over such
> cycles, which seems wrong. At the very least things like
> errdetail_params() are happy to leak into MessageContext.

This leak isn't in MessageContext; if it were, there likely wouldn't
have been a noticeable problem. It's leaking in the executor's
context over repeat ExecutorRun cycles in the same execution state.
We do have an expectation that there won't be per-row leakage in
the ExecutorState.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomasz Szypowski 2019-03-18 22:05:54 Re: pg_upgrade
Previous Message Tom Lane 2019-03-18 22:00:31 Re: BUG #15700: PG 10 vs. 11: Large increase in memory usage when selecting BYTEA data (maybe memory leak)