postgres=# select * from foreign_goods;
id | name
----+------1| aa
2| bb
3| cc
(3rows)
postgres=# select * from foreign_goods where id=1;
id | name
----+------1| aa
(1row)
2.6 执行计划
postgres=# explain (analyze,verbose) select * from foreign_goods where id=1;
QUERY PLAN-----------------------------------------------------------------------------------------------------------------------Foreign Scan onpublic.foreign_goods (cost=100.00..127.20rows=7 width=36)(actual time=1.256..1.257rows=1 loops=1)
Output: id, name
Remote SQL: SELECT id, name FROMpublic.goods WHERE((id =1))
Total runtime: 2.614 ms
(4rows)
3. 问题
postgres=# select * from foreign_goods ;
ERROR: could notconnectto server "server_pgsql_fdw"
DETAIL: could notconnectto server: No route to host
Is the server running on host "192.168.17.35"and accepting
TCP/IP connections on port 5432?