BUG #16666: Slight memory leak when running pg_ctl reload

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: bchen90(at)163(dot)com
Subject: BUG #16666: Slight memory leak when running pg_ctl reload
Date: 2020-10-12 13:32:13
Message-ID: 16666-2c41a4eec61b03e1@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16666
Logged by: BoChen
Email address: bchen90(at)163(dot)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;
}

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2020-10-12 13:55:20 BUG #16667: COMMIT AND CHAIN does not udpates database metrics ie. xact_commit
Previous Message Juan José Santamaría Flecha 2020-10-12 12:33:32 Re: BUG #15858: could not stat file - over 4GB