Re: Fix memory leak when output postgres_fdw's "Relations"

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Fix memory leak when output postgres_fdw's "Relations"
Дата
Msg-id YP4aOiSzpuw3aiCR@paquier.xyz
обсуждение исходный текст
Ответ на Re: Fix memory leak when output postgres_fdw's "Relations"  (Ranier Vilela <ranier.vf@gmail.com>)
Список pgsql-hackers
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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "tanghy.fnst@fujitsu.com"
Дата:
Сообщение: RE: Added schema level support for publication.
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Removing "long int"-related limit on hash table sizes