Re: Fix memory leak in tzparser.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fix memory leak in tzparser.c
Date
Msg-id 2629855.1765986545@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fix memory leak in tzparser.c  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
List pgsql-hackers
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> writes:
> On Tue, Dec 16, 2025 at 1:29 PM Michael Paquier <michael@paquier.xyz> wrote:
>> 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.

> +1. But maybe Shixin has seen a scenario where this temporary
> accumulation has caused some problems because say there were many
> entries whose zone was replaced? Shixin, what problem did you see
> which prompted you to create this patch?

There are only several hundred timezone names in the entire world,
so it's really difficult to believe any interesting amount of
transient memory consumption here.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Visibility bug in tuple lock
Next
From: Christoph Berg
Date:
Subject: Re: pgsql: Revert "Avoid requiring Spanish locale to test NLS infrastructur