aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/init
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2017-06-05 18:53:41 -0700
committerAndres Freund <andres@anarazel.de>2017-06-05 19:18:16 -0700
commit6e1dd2773eb60a6ab87b27b8d9391b756e904ac3 (patch)
treee05bc12289d129431ae8eb1f209784acf7496e55 /src/backend/utils/init
parentc6c333436491a292d56044ed6e167e2bdee015a2 (diff)
downloadpostgresql-6e1dd2773eb60a6ab87b27b8d9391b756e904ac3.tar.gz
postgresql-6e1dd2773eb60a6ab87b27b8d9391b756e904ac3.zip
Unify SIGHUP handling between normal and walsender backends.
Because walsender and normal backends share the same main loop it's problematic to have two different flag variables, set in signal handlers, indicating a pending configuration reload. Only certain walsender commands reach code paths checking for the variable (START_[LOGICAL_]REPLICATION, CREATE_REPLICATION_SLOT ... LOGICAL, notably not base backups). This is a bug present since the introduction of walsender, but has gotten worse in releases since then which allow walsender to do more. A later patch, not slated for v10, will similarly unify SIGHUP handling in other types of processes as well. Author: Petr Jelinek, Andres Freund Reviewed-By: Michael Paquier Discussion: https://postgr.es/m/20170423235941.qosiuoyqprq4nu7v@alap3.anarazel.de Backpatch: 9.2-, bug is present since 9.0
Diffstat (limited to 'src/backend/utils/init')
-rw-r--r--src/backend/utils/init/globals.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/utils/init/globals.c b/src/backend/utils/init/globals.c
index 08b6030a649..8000b79e5aa 100644
--- a/src/backend/utils/init/globals.c
+++ b/src/backend/utils/init/globals.c
@@ -31,6 +31,7 @@ volatile bool QueryCancelPending = false;
volatile bool ProcDiePending = false;
volatile bool ClientConnectionLost = false;
volatile bool IdleInTransactionSessionTimeoutPending = false;
+volatile sig_atomic_t ConfigReloadPending = false;
volatile uint32 InterruptHoldoffCount = 0;
volatile uint32 QueryCancelHoldoffCount = 0;
volatile uint32 CritSectionCount = 0;