postgres.git / summary / log / commit / refs
commit de2b38419c4018fc8c2c917cc2cc752063096cfb
Author: Thomas Munro <tmunro@postgresql.org>
Date: Fri Apr 05 20:31:48 2019 +0000
First released in: 12.0
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
src/backend/postmaster/checkpointer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c
index d303ce36794..a1e04239ad0 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;
}
[parent: 6665305e17ed]