Re: Is there a memory leak in commit 8561e48? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Is there a memory leak in commit 8561e48?
Date
Msg-id 20180502225115.GA1708@paquier.xyz
Whole thread Raw
In response to Re: Is there a memory leak in commit 8561e48?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Is there a memory leak in commit 8561e48?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, May 02, 2018 at 05:20:37PM -0400, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.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

Attachment

pgsql-hackers by date:

Previous
From: Catalin Iacob
Date:
Subject: Re: Is a modern build system acceptable for older platforms
Next
From: Tom Lane
Date:
Subject: Re: Is there a memory leak in commit 8561e48?