From: Thomas Munro Date: Fri, 5 Apr 2019 20:31:48 +0000 (+1300) Subject: Wake up interested backends when a checkpoint fails. X-Git-Tag: REL_12_BETA1~289 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de2b38419c4018fc8c2c917cc2cc752063096cfb;p=postgresql 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 --- 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; }