summaryrefslogtreecommitdiff
path: root/src/include/utils
diff options
context:
space:
mode:
authorMagnus Hagander2021-04-08 09:32:14 +0000
committerMagnus Hagander2021-04-08 09:40:54 +0000
commitaaf043257205ec523f1ba09a3856464d17cf2281 (patch)
tree61ed249bb2622454f53511d051dc1508980ab8e3 /src/include/utils
parentfb310f17812e7321599845a29af2f36c7f1191c3 (diff)
Add functions to wait for backend termination
This adds a function, pg_wait_for_backend_termination(), and a new timeout argument to pg_terminate_backend(), which will wait for the backend to actually terminate (with or without signaling it to do so depending on which function is called). The default behaviour of pg_terminate_backend() remains being timeout=0 which does not waiting. For pg_wait_for_backend_termination() the default wait is 5 seconds. Author: Bharath Rupireddy Reviewed-By: Fujii Masao, David Johnston, Muhammad Usama, Hou Zhijie, Magnus Hagander Discussion: https://postgr.es/m/CALj2ACUBpunmyhYZw-kXCYs5NM+h6oG_7Df_Tn4mLmmUQifkqA@mail.gmail.com
Diffstat (limited to 'src/include/utils')
-rw-r--r--src/include/utils/wait_event.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/utils/wait_event.h b/src/include/utils/wait_event.h
index 44448b48ec0..47accc5ffe2 100644
--- a/src/include/utils/wait_event.h
+++ b/src/include/utils/wait_event.h
@@ -80,6 +80,7 @@ typedef enum
typedef enum
{
WAIT_EVENT_APPEND_READY = PG_WAIT_IPC,
+ WAIT_EVENT_BACKEND_TERMINATION,
WAIT_EVENT_BACKUP_WAIT_WAL_ARCHIVE,
WAIT_EVENT_BGWORKER_SHUTDOWN,
WAIT_EVENT_BGWORKER_STARTUP,