gs_ctl restore后未加break会执行copy

This commit is contained in:
zhang_xubo
2022-09-19 22:25:59 +08:00
parent bed603290d
commit 4cf5f1bf75

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;
} }