【问题标题】:Azure PostgreSQL foreign data wrapper postgres_fdwAzure PostgreSQL 外部数据包装器 postgres_fdw
【发布时间】:2018-08-30 11:09:48
【问题描述】:

我正在尝试使用 Azure DB for PostgreSQL 实例中的 PostgreSQL 外部数据包装器 (postgres_fdw) 扩展。如 Azure DB for PostgreSQL 中所述,应支持外部数据包装器:https://docs.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 或防火墙配置之外的服务器?

【问题讨论】:

    标签: postgresql amazon-web-services azure foreign-data-wrapper


    【解决方案1】:

    对此并不完全确定,但我们前几天试图做这样的事情,偶然发现了这个(有点令人沮丧的)引用:

    “目前,来自 Azure Database for PostgreSQL 的出站连接是 不支持,除非连接到其他 Azure 数据库 PostgreSQL 服务器。”

    来源:https://docs.microsoft.com/en-us/azure/postgresql/concepts-extensions#dblink-and-postgres_fdw

    【讨论】:

    • 嘿@Frederik Struck-Schøning,你知道是否有解决方法吗?
    • 嗨@BrunoWarmling,不幸的是,文档非常清楚这一事实,即 fdw-extension 只能在 Azure 内和同一区域内的 postgres-servers 之间工作(至少暂时如此)。根据您到底要做什么,“解决方法”或解决方案可能是服务器之间的某种数据同步,或者通过某种逻辑层,或者在某些场景中,可能使用 pg-replication。但这些很可能是不平凡的方式,至少超出了这个答案的范围:)
    猜你喜欢
    • 2020-08-02
    • 2020-05-12
    • 1970-01-01
    • 2021-06-27
    • 2020-03-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多