!289 fix core when running mot hacheck
Merge pull request !289 from chenxiaobin/catchup
This commit is contained in:
@ -1104,8 +1104,9 @@ static List* SyncRepGetSyncStandbysQuorum(bool* am_sync, List** catchup_standbys
|
|||||||
|
|
||||||
/* Must be streaming */
|
/* Must be streaming */
|
||||||
if (walsnd->state != WALSNDSTATE_STREAMING) {
|
if (walsnd->state != WALSNDSTATE_STREAMING) {
|
||||||
*catchup_standbys =
|
if (catchup_standbys != NULL && walsnd->state == WALSNDSTATE_CATCHUP) {
|
||||||
walsnd->state == WALSNDSTATE_CATCHUP ? lappend_int(*catchup_standbys, i) : *catchup_standbys;
|
*catchup_standbys = lappend_int(*catchup_standbys, i);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1174,8 +1175,9 @@ static List* SyncRepGetSyncStandbysPriority(bool* am_sync, List** catchup_standb
|
|||||||
|
|
||||||
/* Must be streaming */
|
/* Must be streaming */
|
||||||
if (walsnd->state != WALSNDSTATE_STREAMING) {
|
if (walsnd->state != WALSNDSTATE_STREAMING) {
|
||||||
*catchup_standbys =
|
if (catchup_standbys != NULL && walsnd->state == WALSNDSTATE_CATCHUP) {
|
||||||
walsnd->state == WALSNDSTATE_CATCHUP ? lappend_int(*catchup_standbys, i) : *catchup_standbys;
|
*catchup_standbys = lappend_int(*catchup_standbys, i);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user