On Fri, Jul 23, 2021 at 04:20:37PM -0300, Ranier Vilela wrote: > Maybe not yet. Valgrind may also don't understand yet.
I think that you should do things the opposite way. In short, instead of attempting to understand first Valgrind or Coverity and then Postgres, try to understand the internals of Postgres first and then interpret what Valgrind or even Coverity tell you. Tom is right. There is no point in caring about the addition some pfree()'s in the backend code as long as they don't prove to be an actual leak in the context where a code path is used, and nobody will follow you on that. Some examples where this would be worth caring about are things like tight loops leaking a bit of memory each time these are taken, with leaks that can be easily triggered by the user with some specific SQL commands, or even memory contexts not cleaned up where they should, impacting some parts of the system (like the executor, or even the planner) for a long-running analytical query. -- Michael
signature.asc
Description: PGP signature