【发布时间】:2021-10-29 12:08:21
【问题描述】:
我想更改现有 postgres_fdw 服务器的选项 fdw_startup_cost 的默认值,但收到一条错误消息,指出未找到选项 fdw_startup_cost,即使它是根据文档 (https://www.postgresql.org/docs/12/postgres-fdw.html) 的选项.
我使用的是 PostgreSQL 12.8 版本,用于设置服务器的代码如下:
CREATE EXTENSION postgres_fdw;
CREATE SERVER my_server_name
FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'myhost.whatever.com', dbname 'my_database_name', fetch_size '50000', use_remote_estimate 'true');
我用来更改设置的命令是:
ALTER SERVER prd_rtl_fdw OPTIONS (SET fdw_startup_cost '1000000000000000');
错误信息是:
An error occurred when executing the SQL command:
ALTER SERVER prd_rtl_fdw OPTIONS (SET fdw_startup_cost '1000000000000000')
ERROR: option "fdw_startup_cost" not found
1 statement failed.
如果我创建一个新服务器,我可以使用这个选项(并且应用成功):
CREATE SERVER my_new_server_name
FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'myhost.whatever.com', dbname 'my_database_name',
fetch_size '50000', use_remote_estimate 'true', fdw_startup_cost '1000000000000000');
但不幸的是,出于运营原因,创建新服务器并不是一个真正的选择。
任何帮助将不胜感激!
【问题讨论】: