Re: Fix memory leak in tzparser.c

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Fix memory leak in tzparser.c
Дата
Msg-id aUERZ_xGYW8vjwFQ@paquier.xyz
обсуждение исходный текст
Ответ на Fix memory leak in tzparser.c  (Shixin Wang <wang-shi-xin@outlook.com>)
Список pgsql-hackers
On Tue, Dec 16, 2025 at 05:55:32AM +0000, Shixin Wang wrote:
> While the memory is managed by a temp memory context that gets cleaned up
> eventually, the coarse-grained management might cause some memory to
> accumulate during ParseTzFile() recursive calls when processing @INCLUDE
> directives.
>
> I've attached a patch with this change in case anyone thinks it's worth
> applying.

Why does it matter?  load_tzoffsets() is the sole caller of
ParseTzFile() and it uses a temporary memory context named
TZParserMemory to not have to do cleanups like the one you are
proposing here.
--
Michael

Вложения

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