!2760 解决开启最大可用模式后,集群无法启动问题

Merge pull request !2760 from wenger/fix_ha_bug
This commit is contained in:
opengauss-bot 2023-01-06 01:20:16 +00:00 committed by Gitee
commit 709801983e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 2 deletions

View File

@ -571,7 +571,7 @@ void SyncRepInitConfig(void)
SyncRepGetStandbyGroupAndPriority(&group, &priority);
if (t_thrd.walsender_cxt.MyWalSnd->sync_standby_group != group ||
t_thrd.walsender_cxt.MyWalSnd->sync_standby_priority != priority) {
SpinLockAcquire(&t_thrd.walsender_cxt.MyWalSnd->mutex);
LWLockAcquire(SyncRepLock, LW_EXCLUSIVE);
t_thrd.walsender_cxt.MyWalSnd->sync_standby_group = group;
t_thrd.walsender_cxt.MyWalSnd->sync_standby_priority = priority;
@ -582,7 +582,7 @@ void SyncRepInitConfig(void)
*/
SyncRepCheckSyncStandbyAlive();
SpinLockRelease(&t_thrd.walsender_cxt.MyWalSnd->mutex);
LWLockRelease(SyncRepLock);
ereport(DEBUG1, (errmsg("standby \"%s\" now has synchronous standby group and priority: %d %d",
u_sess->attr.attr_common.application_name, group, priority)));
}