Re: memory leak checking

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: memory leak checking
Дата
Msg-id 1764.1555979357@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: memory leak checking  (Andres Freund <andres@anarazel.de>)
Ответы Re: memory leak checking  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2019-04-22 16:50:25 -0700, Mikhail Bautin wrote:
>> What is the standard memory leak checking policy for the PostgreSQL
>> codebase? I know there is some support for valgrind -- is the test suite
>> being run continuously with valgrind on the build farm?

> Leaks are allowed if they are once-per-backend type things. There's no
> point in e.g. freeing information for timezone metadata, given that
> it'll be used for the whole server lifetime. And there's such things in
> psql too, IIRC.

I would not call the timezone data a "leak", since it's still useful, and
accessible from static pointers, right up to exit.  A true leak for this
purpose is memory that's allocated but not usefully accessible, and I'd
say we discourage that; though small one-time leaks may not be worth the
trouble to get rid of.

            regards, tom lane



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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: finding changed blocks using WAL scanning
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: finding changed blocks using WAL scanning