Re: Is there a memory leak in commit 8561e48?

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, "jian(dot)long(at)i-soft(dot)com(dot)cn" <jian(dot)long(at)i-soft(dot)com(dot)cn>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is there a memory leak in commit 8561e48?
Date: 2018-05-02 22:51:15
Message-ID: 20180502225115.GA1708@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 02, 2018 at 05:20:37PM -0400, Tom Lane wrote:
> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> > Yes, that was the idea. Here is an adjusted patch.
>
> Looks OK to me as far as the leak issue goes. I have no opinion on
> whether this is adequate in respect to cleanup-after-error problems.

With connection poolers letting the connections to the server be around
for a long time, wouldn't it be an issue to let this much memory live
longer than the transaction context? The deeper the stack, the more
memory consumed, hence the more OS cache that PostgreSQL cannot use. So
this could impact performance for some loads. I would vote for cleaning
up this memory instead of letting it live unused in TopMemoryContext.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-05-02 23:03:21 Re: Is there a memory leak in commit 8561e48?
Previous Message Catalin Iacob 2018-05-02 22:32:39 Re: Is a modern build system acceptable for older platforms