forked from huawei/openGauss-server
优化代码结构
This commit is contained in:
parent
2cc54fcbe0
commit
79eb60ec65
|
|
@ -3206,15 +3206,13 @@ static int WalSndLoop(WalSndSendDataCallback send_data)
|
|||
got_recptr = SyncRepGetSyncRecPtr(&receivePtr, &writePtr, &flushPtr, &replayPtr, &amSync, false);
|
||||
if (got_recptr) {
|
||||
ArchiveXlogOnStandby(flushPtr);
|
||||
} else if (t_thrd.syncrep_cxt.SyncRepConfig == NULL ||
|
||||
(t_thrd.walsender_cxt.WalSndCtl->most_available_sync &&
|
||||
list_length(SyncRepGetSyncStandbys(&amSync)) == 0)) {
|
||||
ArchiveXlogOnStandby(t_thrd.walsender_cxt.MyWalSnd->flush);
|
||||
} else {
|
||||
if (t_thrd.syncrep_cxt.SyncRepConfig == NULL ||
|
||||
(t_thrd.walsender_cxt.WalSndCtl->most_available_sync &&
|
||||
list_length(SyncRepGetSyncStandbys(&amSync)) == 0)) {
|
||||
ArchiveXlogOnStandby(t_thrd.walsender_cxt.MyWalSnd->flush);
|
||||
} else {
|
||||
ereport(WARNING, (errcode(ERRCODE_WARNING),
|
||||
errmsg("ArchiveXlogOnStandby failed when call SyncRepGetSyncRecPtr")));
|
||||
}
|
||||
ereport(WARNING, (errcode(ERRCODE_WARNING),
|
||||
errmsg("ArchiveXlogOnStandby failed when call SyncRepGetSyncRecPtr")));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue