Azure PostgreSQL外部数据包装器postgres_fdw

5
我正在尝试从Azure DB for PostgreSQL实例使用PostgreSQL外部数据包装器(postgres_fdw)扩展。如Azure DB for PostgreSQL所述,应支持外部数据包装器:https://learn.microsoft.com/en-us/azure/postgresql/concepts-extensions 我成功创建了一个服务器和用户的映射,但是当我尝试导入表或模式时,出现以下错误:
ERROR:  could not connect to server "<server with public hostname on AWS>"
DETAIL:  could not translate host name "<server with public hostname on AWS>" to address: Unknown host

将主机名替换为公共IP时,会出现以下情况:

ERROR:  could not connect to server "<SERVER NAME>"
DETAIL:  could not connect to server: Network is down (0x00002742/10050)
    Is the server running on host "<public IP of the server" and accepting
    TCP/IP connections on port 5432?

在Azure DB for PostgreSQL实例的防火墙选项中,我已经有了从0.0.0.0开始到255.255.255.255结束的AllowAllIps规则。是否还需要配置其他内容才能访问Azure外部的服务器,例如DNS或防火墙配置?
1个回答

3

嘿@Frederik Struck-Schøning,你知道有没有解决这个问题的方法吗? - Bruno Warmling
嗨@BrunoWarmling,文档不幸地非常清楚地表明,fdw扩展只能在Azure内部的postgres服务器之间以及同一地区内(至少目前是这样)工作。根据您尝试做什么,"解决方法"或解决方案可能是某种数据同步方式,在逻辑层面上或在某些情况下可能可以使用pg复制。但这些很可能是非平凡的方式,至少超出了本答案的范围 :) - Frederik Struck-Schøning

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接