Re: valgrind a background worker

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: valgrind a background worker
Дата
Msg-id 86420.1676058981@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: valgrind a background worker  (Jon Erdman <jon@thewickedtribe.net>)
Список pgsql-general
=?UTF-8?Q?Jon_Erdman?= <jon@thewickedtribe.net> writes:
> I’m suspecting that the leak might be coming from initStringInfo(), as I see a palloc() in there and no associated
pfree()in my background worker’s code, but looking at the elog backend code, it looks like maybe you only have to
explicitlyfree buf if you relocate it larger? 

Usually it's more like "you need to pfree if you allocated in a long-lived
memory context".  elog is working in ErrorContext which it expects will
be reset when the dust settles.

            regards, tom lane



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

Предыдущее
От: "Lawrence, Mike (DTST)"
Дата:
Сообщение: RE: PostgreSQL 13.9.3 Uninstall fails with "Unable to initialize any installation mode"
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: PostgreSQL 13.9.3 Uninstall fails with "Unable to initialize any installation mode"