pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: bchen90@163.com
Subject: BUG #16666: Slight  memory leak when running pg_ctl reload
Date: Mon, 12 Oct 2020 13:32:13 +0000
Message-ID: <16666-2c41a4eec61b03e1@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      16666
Logged by:          BoChen
Email address:      bchen90@163.com
PostgreSQL version: 11.8
Operating system:   SUSE Linux Enterprise Server 11 (x86_64)
Description:        

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.

if (prohibitValueChange)
{
	/* newval shouldn't be NULL, so we're a bit sloppy here */
	if (*conf->variable == NULL || newval == NULL ||
		strcmp(*conf->variable, newval) != 0)
	{
		record->status |= GUC_PENDING_RESTART;
		ereport(elevel,
				(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
				 errmsg("parameter \"%s\" cannot be changed without restarting the
server",
						name)));
		return 0;
	}
	record->status &= ~GUC_PENDING_RESTART;
	return -1;
}



view thread (4+ messages)  latest in thread

Message-ID: <16666-2c41a4eec61b03e1@postgresql.org>
Permalink:  ../16666-2c41a4eec61b03e1@postgresql.org/
Also on:    postgresql.org/message-id/16666-2c41a4eec61b03e1@postgresql.org

 · 

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: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, bchen90@163.com
  Subject: Re: BUG #16666: Slight  memory leak when running pg_ctl reload
  In-Reply-To: <16666-2c41a4eec61b03e1@postgresql.org>

* 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