forked from huawei/openGauss-server
bugfix 修复无法使用域名搭建主从bug,如果replconninfo中配置域名,则无法与 pg_getnameinfo_all获取的IP比较 ,只能和port->remote_host中的域名比较。
This commit is contained in:
parent
d26ec83e7b
commit
cede8802dc
|
@ -2197,7 +2197,8 @@ bool is_node_internal_connection(hbaPort* port)
|
|||
} else {
|
||||
replconninfo = u_sess->attr.attr_storage.ReplConnInfoArr[i];
|
||||
}
|
||||
if (replconninfo && *replconninfo != '\0' && strcasestr(replconninfo, remote_host) != NULL) {
|
||||
if (replconninfo && *replconninfo != '\0' && (strcasestr(replconninfo, remote_host) != NULL ||
|
||||
strcasestr(replconninfo, port->remote_host) != NULL)) {
|
||||
ereport(DEBUG2, (errmsg("remote host is:%s in replconninfo %s", remote_host, replconninfo)));
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue