create extension postgres_fdw ; create server pg_xxxxx foreign data wrapper postgres_fdw OPTIONS ( host 'pgm-xxxxxxxxxx.pg.rds.aliyuncs.com',port 'xxxx',dbname 'xxxxx_app') ; create user MAPPING FOR postgres server pg_xxxxx OPTIONS ( user 'xxxx_app', password 'xxxxxxxxxxxx') ; create foreign table pg__brand ( id bigint , name varchar , letter varchar , deleted integer , hidden integer ) server pg_xxxxx options ( schema_name 'xxxxx_app', table_name 'pg_brand') ; 10:23:01 > select * from pg__brand ; ERROR: could not connect to server "pg_xxxxx"描述: could not translate host name "pgm-wz9jxxxxxxxxxxxxxxxxxx.rds.aliyuncs.com" to address: Temporary failure in name resolution pg 数据库的 外部表, 连接到 阿里云的 RDS postgresql 。 报这个错误, why postgres_fdw 解析不了 阿里云的这个链接串。 虽然 设置了dns 解析。 也是用这个连接串建立的 forigon server 但是解析不了。 需要在 /etc/hosts 里面指定 ip 地址 跟 连接串。 nslookup pgm-wz9jxxxxxxxxxxxxxxxxxx.rds.aliyuncs.com 把解析出来的 ip 地址填到 /etc/hosts
postgres_fdw 无法通过域名 访问外部表问题
来源:这里教程网
时间:2026-03-14 20:27:20
作者:
编辑推荐:
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- check_postgres脚本集检查数据库健康情况
check_postgres脚本集检查数据库健康情况
26-03-14 - PostgreSQL死锁相关
PostgreSQL死锁相关
26-03-14 - PostgreSQL的常用索引
PostgreSQL的常用索引
26-03-14 - pg_buffercache安装及使用
pg_buffercache安装及使用
26-03-14 - PG优化器简单概述
PG优化器简单概述
26-03-14 - PostgreSQL 14中TOAST的新压缩算法LZ4,它有多快?
PostgreSQL 14中TOAST的新压缩算法LZ4,它有多快?
26-03-14 - RockyLinux创建自定义systemd服务(手把手教你配置Linux后台守护进程)
- MogDB/openGauss与PG的repmgr对比
MogDB/openGauss与PG的repmgr对比
26-03-14 - 聚焦PGConf.Asia-腾讯云分论坛,Get金融级分布式数据库集大成之作
- 原汁原味的韩语演讲,就在PGConf.Asia2021-首尔子论坛
原汁原味的韩语演讲,就在PGConf.Asia2021-首尔子论坛
26-03-14
