4
4
*
5
5
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
6
6
*
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 $
8
8
*/
9
9
10
10
%{
@@ -283,6 +283,10 @@ ProcessConfigFile(GucContext context)
283
283
/* Now we can re-apply the wired-in default */
284
284
set_config_option (gconf->name , NULL , context, PGC_S_DEFAULT,
285
285
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 )));
286
290
}
287
291
288
292
/*
@@ -309,9 +313,18 @@ ProcessConfigFile(GucContext context)
309
313
/* If we got here all the options checked out okay, so apply them. */
310
314
for (item = head; item; item = item->next)
311
315
{
316
+ char *pre_value = NULL ;
317
+
318
+ if (context == PGC_SIGHUP)
319
+ pre_value = pstrdup (GetConfigOption (item->name ));
320
+
312
321
if (set_config_option (item->name , item->value , context,
313
322
PGC_S_FILE, GUC_ACTION_SET, true ))
314
323
{
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 )));
315
328
set_config_sourcefile (item->name , item->filename ,
316
329
item->sourceline );
317
330
}
0 commit comments