pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: bchen90@163.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16666: Slight memory leak when running pg_ctl reload
Date: Mon, 12 Oct 2020 13:37:51 -0400
Message-ID: <3197647.1602524271@sss.pgh.pa.us> (raw)
In-Reply-To: <16666-2c41a4eec61b03e1@postgresql.org>
References: <16666-2c41a4eec61b03e1@postgresql.org>

PG Bug reporting form <noreply@postgresql.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





view thread (4+ messages)

Message-ID: <3197647.1602524271@sss.pgh.pa.us>
Permalink:  ../3197647.1602524271@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3197647.1602524271@sss.pgh.pa.us

 · 

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: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bchen90@163.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16666: Slight memory leak when running pg_ctl reload
  In-Reply-To: <3197647.1602524271@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox