Re: Valgrind - showing memory leaks
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Yasir <yasir.hussain.shah@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-05-08T14:27:58Z
Lists: pgsql-hackers
Yasir <yasir.hussain.shah@gmail.com> writes: > I believe that the valgrind should not report any memory leaks in such > simple/common commands. What am I doing wrong here? I think you are vastly overestimating both the intelligence of valgrind, and our level of concern about minor one-time leaks. Most of these are probably not really leaks at all, but failure on valgrind's part to notice the relevant pointers. Moreover, almost all are blamed on catcache setup, which is a one-time operation; so even if it is losing track of some allocations, it's not likely to be something worth worrying about. Alvaro seems to think CheckNNConstraintFetch is worth taking a second look at, and maybe he's right, but the amount of storage involved there seems unexciting too. regards, tom lane
Commits
-
relcache: Avoid memory leak on tables with no CHECK constraints
- dc9a2d54fd25 18.0 landed
-
Silence compilers about extractNotNullColumn()
- ff239c3bf4e8 18.0 cited