!1815 修复主备连接正常的情况下用set方式设置会话级别synchronous_commit为on后却导致阻塞的问题

Merge pull request !1815 from 薛蒙恩/synczs
This commit is contained in:
opengauss-bot
2022-06-23 03:36:43 +00:00
committed by Gitee

View File

@ -1028,7 +1028,7 @@ static void SyncRepGetStandbyGroupAndPriority(int* gid, int* prio)
if (AM_WAL_STANDBY_SENDER || AM_WAL_SHARE_STORE_SENDER || AM_WAL_HADR_DNCN_SENDER || AM_WAL_DB_SENDER)
return;
if (!SyncStandbysDefined() || t_thrd.syncrep_cxt.SyncRepConfig == NULL || !SyncRepRequested())
if (!SyncStandbysDefined() || t_thrd.syncrep_cxt.SyncRepConfig == NULL)
return;
for (group = 0; group < t_thrd.syncrep_cxt.SyncRepConfigGroups && !found; group++) {