pgsql: Don't leak rd_statlist when a relcache entry is dropped. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Don't leak rd_statlist when a relcache entry is dropped.
Date
Msg-id E1lN4nd-0001nq-Du@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/28644fac10731e30e70b622986a6fbbeb5a5b2f9

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


pgsql-committers by date:

Previous
From: Tomas Vondra
Date:
Subject: pgsql: Fix TAP test for remove_temp_files_after_crash
Next
From: Fujii Masao
Date:
Subject: pgsql: Fix comments in postmaster.c.