Re: BUG #16666: Slight memory leak when running pg_ctl reload

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: bchen90(at)163(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16666: Slight memory leak when running pg_ctl reload
Date: 2020-10-12 17:37:51
Message-ID: 3197647.1602524271@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> I found slighting memory leakage occured when running pg_ctl reload command
> for the following code segment(guc.c:6726-6740). When runing 'pg_ctl
> reload', for these string type PGC_POSTMASTER GUC variables like
> 'unix_socket_directories', the following code segment will leak newval's
> memery.

Yeah, you're right. If there's a "newextra" chunk, that'll get
leaked too.

Even counting that, it's not very plausible that one would SIGHUP a
server often enough that the bloat would become obvious, since these
values typically aren't very large. But it's clearly a bug.

Patch applied, thanks for the report!

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-10-12 18:12:15 Re: Identity column behavior discrepancies when inserting one or many rows
Previous Message Petr Jelinek 2020-10-12 16:20:47 Re: BUG #16643: PG13 - Logical replication - initial startup never finishes and gets stuck in startup loop