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 */
284284set_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. */
310314for (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+
312321if (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 )));
315328set_config_sourcefile (item->name , item->filename ,
316329 item->sourceline );
317330}