From fc49ab136354077d2031ee081f95b4ac14e14201 Mon Sep 17 00:00:00 2001 From: Amul Sul Date: Tue, 21 Sep 2021 06:05:36 -0400 Subject: [PATCH v41 3/7] Allow RequestCheckpoint() call from checkpointer process --- src/backend/postmaster/checkpointer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c index be7366379d0..3ba9d795818 100644 --- a/src/backend/postmaster/checkpointer.c +++ b/src/backend/postmaster/checkpointer.c @@ -924,9 +924,11 @@ RequestCheckpoint(int flags) old_started; /* - * If in a standalone backend, just do it ourselves. + * If in a standalone backend or checkpointer with wait for completion flag, + * just do it ourselves. */ - if (!IsPostmasterEnvironment) + if (!IsPostmasterEnvironment || + (AmCheckpointerProcess() && (flags & CHECKPOINT_WAIT))) { /* * There's no point in doing slow checkpoints in a standalone backend, -- 2.18.0