diff --git a/src/gausskernel/process/postmaster/postmaster.cpp b/src/gausskernel/process/postmaster/postmaster.cpp index bc190a7c449ef24b0ced0dda18c95db9813dcbd3..3b153e4ffd1d7489798a48a46483fdc34574ab67 100644 --- a/src/gausskernel/process/postmaster/postmaster.cpp +++ b/src/gausskernel/process/postmaster/postmaster.cpp @@ -4170,7 +4170,7 @@ static int ServerLoop(void) * let cbm writer thread exit if enable_cbm_track gus is switched off */ if (!u_sess->attr.attr_storage.enable_cbm_tracking && g_instance.pid_cxt.CBMWriterPID != 0 && - pmState == PM_RUN) { + (pmState == PM_RUN || pmState == PM_HOT_STANDBY || pmState == PM_RECOVERY)) { ereport(LOG, (errmsg("stop cbm writer thread because enable_cbm_tracking is switched off, " "cbm writer thread pid=%lu",