aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/misc/guc.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 2181a39853b..ea54d164ccc 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -5669,9 +5669,23 @@ set_config_option(const char *name, const char *value,
* ignore it in existing backends. This is a tad klugy, but
* necessary because we don't re-read the config file during
* backend start.
+ *
+ * In EXEC_BACKEND builds, this works differently: we load all
+ * nondefault settings from the CONFIG_EXEC_PARAMS file during
+ * backend start. In that case we must accept PGC_SIGHUP
+ * settings, so as to have the same value as if we'd forked
+ * from the postmaster. We detect this situation by checking
+ * IsInitProcessingMode, which is a bit ugly, but it doesn't
+ * seem worth passing down an explicit flag saying we're doing
+ * read_nondefault_variables().
*/
+#ifdef EXEC_BACKEND
+ if (IsUnderPostmaster && !IsInitProcessingMode())
+ return -1;
+#else
if (IsUnderPostmaster)
return -1;
+#endif
}
else if (context != PGC_POSTMASTER && context != PGC_BACKEND &&
source != PGC_S_CLIENT)
@@ -8311,6 +8325,12 @@ read_nondefault_variables(void)
GucContext varscontext;
/*
+ * Assert that PGC_BACKEND case in set_config_option() will do the right
+ * thing.
+ */
+ Assert(IsInitProcessingMode());
+
+ /*
* Open file
*/
fp = AllocateFile(CONFIG_EXEC_PARAMS, "r");