public inbox for [email protected]
help / color / mirror / Atom feedFrom: Fujii Masao <[email protected]>
To: Chao Li <[email protected]>
Cc: Henrik TJ <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Fix memory leak in postmasterMain
Date: Thu, 23 Apr 2026 00:29:29 +0900
Message-ID: <CAHGQGwEn3oEad-wR1XoEbe1R-pB1EOycRKjEj+5Pp38mjgiF+Q@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
On Wed, Apr 22, 2026 at 3:46 PM Chao Li <[email protected]> wrote:
>
> From my experience, most of the time the postmaster is started with -D. On Linux and macOS, that path can be quite long, PATH_MAX is often 4096 on many Unix-like systems, and I am not sure about Windows. So I think this leak is worth fixing.
We can also free()/pfree() userDoption in postgres.c and bootstrap.c?
Since userDoption typically uses only a small amount of memory, I'm not sure
this patch provides much practical benefit from a memory-leak perspective.
So I don't think it needs to be backpatched to the stable branches.
OTOH, if it helps keep Valgrind quiet for userDoption, I may be ok with
applying it to master.
Regards,
--
Fujii Masao
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Fix memory leak in postmasterMain
In-Reply-To: <CAHGQGwEn3oEad-wR1XoEbe1R-pB1EOycRKjEj+5Pp38mjgiF+Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox