更改是否执行下一个归档任务的判断

This commit is contained in:
luozihao 2021-05-28 16:28:46 +08:00
parent 6884947f92
commit 0ef7e16c01
1 changed files with 3 additions and 2 deletions

View File

@ -448,8 +448,6 @@ static void pgarch_MainLoop(void)
}
} else {
pgarch_ArchiverCopyLoop();
/* archive xlog on standby success, we need to change the status of archive task. */
ChangeArchiveTaskStatus2Done();
gettimeofday(&last_copy_time, NULL);
}
}
@ -567,6 +565,9 @@ static void pgarch_ArchiverCopyLoop(void)
if (pgarch_archiveXlog(xlog)) {
/* successful */
pgarch_archiveDone(xlog);
/* archive xlog on standby success, we need to change the status of archive task. */
ChangeArchiveTaskStatus2Done();
break; /* out of inner retry loop */
} else {
if (++failures >= NUM_ARCHIVE_RETRIES) {