summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Munro2019-04-05 20:31:48 +0000
committerThomas Munro2019-04-05 20:31:48 +0000
commitde2b38419c4018fc8c2c917cc2cc752063096cfb (patch)
treec2c19cd511efd3a3dcb0fa9f3f713689c29cbc0d
parent6665305e17edff3e2c43d71396ea5b6a69e7b6f3 (diff)
Wake up interested backends when a checkpoint fails.
Commit c6c9474a switched to condition variables instead of sleep loops to notify backends of checkpoint start and stop, but forgot to broadcast in case of checkpoint failure. Author: Thomas Munro Discussion: https://postgr.es/m/CA%2BhUKGJKbCd%2B_K%2BSEBsbHxVT60SG0ivWHHAdvL0bLTUt2xpA2w%40mail.gmail.com
-rw-r--r--src/backend/postmaster/checkpointer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c
index d303ce3679..a1e04239ad 100644
--- a/src/backend/postmaster/checkpointer.c
+++ b/src/backend/postmaster/checkpointer.c
@@ -279,6 +279,8 @@ CheckpointerMain(void)
CheckpointerShmem->ckpt_done = CheckpointerShmem->ckpt_started;
SpinLockRelease(&CheckpointerShmem->ckpt_lck);
+ ConditionVariableBroadcast(&CheckpointerShmem->done_cv);
+
ckpt_active = false;
}