aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2021-07-27 15:44:12 -0400
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2021-07-27 15:44:12 -0400
commit6feb229f53f8de704ee2ff709d2c44e1c4d6be92 (patch)
treee80aa5d95663019fcb496b1ed8a8af789671eef1 /src/backend
parentde87c481f635953e84e7d3b404e15700301bcdac (diff)
downloadpostgresql-6feb229f53f8de704ee2ff709d2c44e1c4d6be92.tar.gz
postgresql-6feb229f53f8de704ee2ff709d2c44e1c4d6be92.zip
Set pg_setting.pending_restart when pertinent config lines are removed
This changes the behavior of examining the pg_file_settings view after changing a config option that requires restart. The user needs to know that any change of such options does not take effect until a restart, and this worked correctly if the line is edited without removing it. However, for the case where the line is removed altogether, the flag doesn't get set, because a flag was only set in set_config_option, but that's not called for lines removed. Repair. (Ref.: commits 62d16c7fc561 and a486e35706ea) Author: Álvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Daniel Gustafsson <daniel@yesql.se> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/202107262302.xsfdfc5sb7sh@alvherre.pgsql
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/utils/misc/guc-file.l2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/utils/misc/guc-file.l b/src/backend/utils/misc/guc-file.l
index 2aaab3d5f80..9d65186408d 100644
--- a/src/backend/utils/misc/guc-file.l
+++ b/src/backend/utils/misc/guc-file.l
@@ -347,6 +347,8 @@ ProcessConfigFileInternal(GucContext context, bool applySettings, int elevel)
continue;
if (gconf->context < PGC_SIGHUP)
{
+ /* The removal can't be effective without a restart */
+ gconf->status |= GUC_PENDING_RESTART;
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
errmsg("parameter \"%s\" cannot be changed without restarting the server",