]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Don't leak rd_statlist when a relcache entry is dropped.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 19 Mar 2021 00:37:09 +0000 (20:37 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 19 Mar 2021 00:37:09 +0000 (20:37 -0400)
commit5368369701447b4f2a767c34cfde1f9f4eb53f7a
treeaa2e913d40ebe5d121626fc824501f2950dda1d8
parent0c3079e3ef6956feefc9cc4f62ad1f9acc7c84e9
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
src/backend/utils/cache/relcache.c