Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit44608ae

Browse files
committed
When reloading postgresql.conf, log what parameters actually changed
1 parent488d70a commit44608ae

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

‎src/backend/utils/misc/guc-file.l

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.59 2009/04/09 14:21:02 tgl Exp $
7+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.60 2009/09/17 20:54:03 petere Exp $
88
*/
99

1010
%{
@@ -283,6 +283,10 @@ ProcessConfigFile(GucContext context)
283283
/* Now we can re-apply the wired-in default */
284284
set_config_option(gconf->name,NULL, context, PGC_S_DEFAULT,
285285
GUC_ACTION_SET,true);
286+
if (context == PGC_SIGHUP)
287+
ereport(elevel,
288+
(errmsg("parameter\"%s\" removed from configuration file, reset to default",
289+
gconf->name)));
286290
}
287291

288292
/*
@@ -309,9 +313,18 @@ ProcessConfigFile(GucContext context)
309313
/* If we got here all the options checked out okay, so apply them. */
310314
for (item = head; item; item = item->next)
311315
{
316+
char *pre_value =NULL;
317+
318+
if (context == PGC_SIGHUP)
319+
pre_value =pstrdup(GetConfigOption(item->name));
320+
312321
if (set_config_option(item->name, item->value, context,
313322
PGC_S_FILE, GUC_ACTION_SET,true))
314323
{
324+
if (pre_value &&strcmp(pre_value,GetConfigOption(item->name)) !=0)
325+
ereport(elevel,
326+
(errmsg("parameter\"%s\" changed to\"%s\"",
327+
item->name, item->value)));
315328
set_config_sourcefile(item->name, item->filename,
316329
item->sourceline);
317330
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp