summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Munro2025-07-12 04:20:11 +0000
committerThomas Munro2025-07-12 04:34:06 +0000
commit7d11f36e71a97603802c6a3dd019e206729a80c7 (patch)
treee694e4154d12aacba89e61becca2ac6172f96d66
parentb4c19da93a08f767f88de9696af0de3b1715d40e (diff)
aio: Fix configuration reload in IO workers.REL_18_STABLE
method_worker.c installed SignalHandlerForConfigReload, but it failed to actually process reload requests. That hasn't yet produced any concrete problem reports in terms of GUC changes it should have cared about in v18, but it was inconsistent. It did cause problems for a couple of patches in development that need IO workers to react to ALTER SYSTEM + pg_reload_conf(). Fix extracted from one of those patches. Back-patch to 18. Reported-by: Dmitry Dolgov <[email protected]> Discussion: https://postgr.es/m/sh5uqe4a4aqo5zkkpfy5fobe2rg2zzouctdjz7kou4t74c66ql%40yzpkxb7pgoxf
-rw-r--r--src/backend/storage/aio/method_worker.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/backend/storage/aio/method_worker.c b/src/backend/storage/aio/method_worker.c
index 1ce1bcd57a0..bf8f77e6ff6 100644
--- a/src/backend/storage/aio/method_worker.c
+++ b/src/backend/storage/aio/method_worker.c
@@ -575,6 +575,12 @@ IoWorkerMain(const void *startup_data, size_t startup_data_len)
}
CHECK_FOR_INTERRUPTS();
+
+ if (ConfigReloadPending)
+ {
+ ConfigReloadPending = false;
+ ProcessConfigFile(PGC_SIGHUP);
+ }
}
error_context_stack = errcallback.previous;