!2193 gs_ctl restore后未加break导致会执行copy操作

Merge pull request !2193 from zhangxubo/master3
This commit is contained in:
opengauss-bot
2022-09-20 08:53:02 +00:00
committed by Gitee

View File

@ -6937,13 +6937,15 @@ int main(int argc, char** argv)
} else { } else {
pg_log(PG_PROGRESS, _("Another gs_ctl command is still running, restore failed.\n")); pg_log(PG_PROGRESS, _("Another gs_ctl command is still running, restore failed.\n"));
} }
break;
case COPY_COMMAND: case COPY_COMMAND:
if (-1 != pg_ctl_lock(pg_ctl_lockfile, &lockfile)) { if (-1 != pg_ctl_lock(pg_ctl_lockfile, &lockfile)) {
do_xlog_copy(); do_xlog_copy();
(void)pg_ctl_unlock(lockfile); (void)pg_ctl_unlock(lockfile);
} else { } else {
pg_log(PG_PROGRESS, _("Another gs_ctl command is still running, restore failed.\n")); pg_log(PG_PROGRESS, _("Another gs_ctl command is still running, copy failed.\n"));
} }
break;
default: default:
break; break;
} }