pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't leak rd_statlist when a relcache entry is dropped.
Date: Fri, 19 Mar 2021 02:23:41 +0000
Message-ID: <E1lN4nd-0001oj-MC@gemulon.postgresql.org> (raw)

Don't leak rd_statlist when a relcache entry is dropped.

Although these lists are usually NIL, and even when not empty
are unlikely to be large, constant relcache update traffic could
eventually result in visible bloat of CacheMemoryContext.

Found via valgrind testing.
Back-patch to v10 where this field was added.

Discussion: https://postgr.es/m/3816764.1616104288@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2bed650c4841cb63a8cede0db9452664f39bc314

Modified Files
--------------
src/backend/utils/cache/relcache.c | 1 +
1 file changed, 1 insertion(+)



view thread (5+ messages)

Message-ID: <E1lN4nd-0001oj-MC@gemulon.postgresql.org>
Permalink:  ../E1lN4nd-0001oj-MC@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lN4nd-0001oj-MC@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Don't leak rd_statlist when a relcache entry is dropped.
  In-Reply-To: <E1lN4nd-0001oj-MC@gemulon.postgresql.org>
  References: <E1lN4nd-0001oj-MC@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox