diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:18:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:18:04 +0000 |
commit | 1d82e40c4e30d4666490f7a02db711541b5bb77f (patch) | |
tree | dcc6d635e272e13637f4ffedb91a3756f4a54c9b /src/backend/utils/misc/guc.c | |
parent | Adding debian version 15.5-0+deb12u1. (diff) | |
download | postgresql-15-1d82e40c4e30d4666490f7a02db711541b5bb77f.tar.xz postgresql-15-1d82e40c4e30d4666490f7a02db711541b5bb77f.zip |
Merging upstream version 15.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r-- | src/backend/utils/misc/guc.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 0b5b77b..07d6538 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -1285,7 +1285,7 @@ static struct config_bool ConfigureNamesBool[] = {"fsync", PGC_SIGHUP, WAL_SETTINGS, gettext_noop("Forces synchronization of updates to disk."), gettext_noop("The server will use the fsync() system call in several places to make " - "sure that updates are physically written to disk. This insures " + "sure that updates are physically written to disk. This ensures " "that a database cluster will recover to a consistent state after " "an operating system or hardware crash.") }, @@ -7643,9 +7643,12 @@ set_config_option_ext(const char *name, const char *value, * Other changes might need to affect other workers, so forbid them. */ if (IsInParallelMode() && changeVal && action != GUC_ACTION_SAVE) + { ereport(elevel, (errcode(ERRCODE_INVALID_TRANSACTION_STATE), errmsg("cannot set parameters during a parallel operation"))); + return -1; + } record = find_option(name, true, false, elevel); if (record == NULL) @@ -7740,6 +7743,10 @@ set_config_option_ext(const char *name, const char *value, * backends. This is a tad klugy, but necessary because we * don't re-read the config file during backend start. * + * However, if changeVal is false then plow ahead anyway since + * we are trying to find out if the value is potentially good, + * not actually use it. + * * In EXEC_BACKEND builds, this works differently: we load all * non-default settings from the CONFIG_EXEC_PARAMS file * during backend start. In that case we must accept @@ -7750,7 +7757,7 @@ set_config_option_ext(const char *name, const char *value, * started it. is_reload will be true when either situation * applies. */ - if (IsUnderPostmaster && !is_reload) + if (IsUnderPostmaster && changeVal && !is_reload) return -1; } else if (context != PGC_POSTMASTER && |